From b74f517ac86b7777bac8d7043fed2ffa810da256 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: May 19 2017 17:54:11 +0000 Subject: Update to version 3.3.0 Conform to the latest packaging guidelines Provide a python3 subpackage Fix bogus changelog dates --- diff --git a/.gitignore b/.gitignore index 2cace75..9b25828 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ SQLObject-0.14.1.tar.gz /SQLObject-1.2.1.tar.gz /SQLObject-1.2.2.tar.gz /SQLObject-1.5.1.tar.gz +/SQLObject-3.3.0.tar.gz diff --git a/python-sqlobject.spec b/python-sqlobject.spec index f3048c4..f4b8e96 100644 --- a/python-sqlobject.spec +++ b/python-sqlobject.spec @@ -1,27 +1,62 @@ -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%global pypi_name SQLObject +%global lc_name sqlobject -Name: python-sqlobject -Version: 1.5.1 -Release: 5%{?dist} +Name: python-%{lc_name} +Version: 3.3.0 +Release: 1%{?dist} Summary: SQLObject Object-Relational Manager, aka database wrapper -Group: Development/Libraries License: LGPLv2+ URL: http://sqlobject.org/ -Source0: http://cheeseshop.python.org/packages/source/S/SQLObject/SQLObject-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/source/S/%{pypi_name}/%{pypi_name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildArch: noarch +%description +Classes created using SQLObject wrap database rows, presenting a +friendly-looking Python object instead of a database/SQL interface. +Emphasizes convenience. Works with MySQL, Postgres, SQLite, Firebird. + +This package requires sqlite. Futher database connectors have to be +installed separately. + +%package -n python2-%{lc_name} +Summary: %{summary} + BuildRequires: python2-devel -BuildRequires: python-setuptools -BuildRequires: python-formencode -Requires: python-formencode >= 1.1.1 -Requires: MySQL-python -Requires: postgresql-python +BuildRequires: python2-setuptools +BuildRequires: python2-formencode +Requires: python2-formencode +Requires: python2-mysql +Requires: python2-pydispatcher +Requires: python2-PyGreSQL +%{?python_provide:%python_provide python2-%{lc_name}} -%description +%description -n python2-%{lc_name} +Classes created using SQLObject wrap database rows, presenting a +friendly-looking Python object instead of a database/SQL interface. +Emphasizes convenience. Works with MySQL, Postgres, SQLite, Firebird. + +This package requires sqlite. Futher database connectors have to be +installed separately. + +This package provides Python 2 build of %{lc_name}. + +%package -n python3-%{lc_name} +Summary: %{summary} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-formencode +Requires: python3-formencode +Requires: python3-mysql +Requires: python3-pydispatcher +Requires: python3-PyGreSQL + +%{?python_provide:%python_provide python3-%{lc_name}} + +%description -n python3-%{lc_name} Classes created using SQLObject wrap database rows, presenting a friendly-looking Python object instead of a database/SQL interface. Emphasizes convenience. Works with MySQL, Postgres, SQLite, Firebird. @@ -29,32 +64,45 @@ Emphasizes convenience. Works with MySQL, Postgres, SQLite, Firebird. This package requires sqlite. Futher database connectors have to be installed separately. +This package provides Python 3 build of %{lc_name}. + %prep -%setup -q -n SQLObject-%{version} +%autosetup -n %{pypi_name}-%{version} +# Delete shebang in all relevant files in docs +find docs -type f -exec sed -i '\@^#!/usr/bin/\(python\|env python\)[23]\?@d' {} + +# Change shebang in all relevant files +find -type f -exec sed -i '1s=^#!/usr/bin/\(python\|env python\)[23]\?=#!%{__python3}=' {} + %build -%{__python} setup.py build +%py2_build +%py3_build + chmod 0644 docs/rebuild %install -rm -rf $RPM_BUILD_ROOT -%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT - +%py2_install -%clean -rm -rf $RPM_BUILD_ROOT +# The Python 2 installation process will likely try to install its own version +# of the application. As we only want to package the Python 3 version of the +# application, we delete the Python 2 executable(s) so that the Python 3 +# version(s) can take their place afterwards. +rm %{buildroot}%{_bindir}/* +%py3_install -%files -%defattr(-,root,root,-) -%doc PKG-INFO README.txt docs +%files -n python2-%{lc_name} +%doc PKG-INFO README.rst docs +%{python2_sitelib}/* -%{python_sitelib}/* +%files -n python3-%{lc_name} +%doc PKG-INFO README.rst docs +%{python3_sitelib}/* %{_bindir}/* %changelog -* Sat Feb 11 2017 Fedora Release Engineering - 1.5.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild +* Tue Nov 1 2016 Jan Beran - 3.3.0-1 +- Update to the latest upstream version +- Provide Python 3 subpackage * Thu Feb 04 2016 Fedora Release Engineering - 1.5.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild @@ -177,7 +225,7 @@ rm -rf $RPM_BUILD_ROOT - Include pyo files instead of ghosting them - Rebuild for FC6 -* Sun Jun 9 2006 Luke Macken 0.7.0-6 +* Fri Jun 9 2006 Luke Macken 0.7.0-6 - Add python-sqlobject-0.7.0-pkg_resources.patch (Bug #195548) - Remove unnecessary python-abi requirement @@ -187,12 +235,12 @@ rm -rf $RPM_BUILD_ROOT * Sun Oct 23 2005 Oliver Andrich 0.7.0-4.fc4 - %%{?dist} for further distinguish the different builts. -* Tue Oct 13 2005 Oliver Andrich 0.7.0-3 +* Thu Oct 13 2005 Oliver Andrich 0.7.0-3 - fixed a spelling error reported by rpmlint - changed the installation to use -O1 - %%ghost'ed the the resulting *.pyo files -* Tue Oct 06 2005 Oliver Andrich 0.7.0-2 +* Thu Oct 06 2005 Oliver Andrich 0.7.0-2 - fixed requirement for FormEncode >= 0.2.2 - Upgrade to upstream version 0.7.0 diff --git a/sources b/sources index ab71346..b463d90 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0ac4aa31d89ea151ae66266420a1b521 SQLObject-1.5.1.tar.gz +SHA512 (SQLObject-3.3.0.tar.gz) = adb70b6fd9feed5c2cfed85fdcf7028ef2a8c39a450c736f8e0600211eadf9e8448cb0e486dd1204e53c4016f05b2f118ad3e5b9c2dabdf294b351138ee780a2