diff --git a/python-zope-sequencesort.spec b/python-zope-sequencesort.spec index 358551b..f2a29ce 100644 --- a/python-zope-sequencesort.spec +++ b/python-zope-sequencesort.spec @@ -1,9 +1,13 @@ +%if 0%{?fedora} +%global with_python3 1 +%endif + %global modname zope.sequencesort Summary: Sequence Sorting Name: python-zope-sequencesort Version: 4.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Source0: http://pypi.python.org/packages/source/z/%{modname}/%{modname}-%{version}.tar.gz License: ZPLv2.1 Group: Development/Libraries @@ -15,32 +19,85 @@ BuildRequires: python-setuptools # for tests BuildRequires: python-zope-testing + +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +# for tests +BuildRequires: python3-zope-testing +%endif + %description This package provides a very advanced sequence sorting feature. +%package -n python2-zope-sequencesort +Summary: Sequence Sorting +%{?python_provide:%python_provide python2-zope-sequencesort} + +Requires: python2 + +%description -n python2-zope-sequencesort +This package provides a very advanced sequence sorting feature. + +%if 0%{?with_python3} +%package -n python3-zope-sequencesort +Summary: Sequence Sorting +%{?python_provide:%python_provide python3-zope-sequencesort} + +Requires: python3 + +%description -n python3-zope-sequencesort +This package provides a very advanced sequence sorting feature. +%endif + %prep %setup -q -n %{modname}-%{version} %build -%{__python} setup.py build +%py2_build +%if 0%{?with_python3} +%py3_build +%endif %install -%{__python} setup.py install --root=%{buildroot} +%py2_install +%if 0%{?with_python3} +%py3_install +%endif %check -%{__python} setup.py test +%{__python2} setup.py test +%if 0%{?with_python3} +%{__python3} setup.py test +%endif -%files +%files -n python2-zope-sequencesort +%doc CHANGES.txt README.txt COPYRIGHT.txt docs/ +%license LICENSE.txt +# Co-own %%{python2_sitelib}/zope/ +%dir %{python2_sitelib}/zope/ +%{python2_sitelib}/zope/sequencesort/ +%exclude %{python2_sitelib}/zope/sequencesort/tests/ +%{python2_sitelib}/%{modname}-*.egg-info +%{python2_sitelib}/%{modname}-*-nspkg.pth + +%if 0%{?with_python3} +%files -n python3-zope-sequencesort %doc CHANGES.txt README.txt COPYRIGHT.txt docs/ %license LICENSE.txt -# Co-own %%{python_sitelib}/zope/ -%dir %{python_sitelib}/zope/ -%{python_sitelib}/zope/sequencesort/ -%exclude %{python_sitelib}/zope/sequencesort/tests/ -%{python_sitelib}/%{modname}-*.egg-info -%{python_sitelib}/%{modname}-*-nspkg.pth +# Co-own %%{python3_sitelib}/zope/ +%dir %{python3_sitelib}/zope/ +%{python3_sitelib}/zope/sequencesort/ +%exclude %{python3_sitelib}/zope/sequencesort/tests/ +%{python3_sitelib}/%{modname}-*.egg-info +%{python3_sitelib}/%{modname}-*-nspkg.pth +%endif %changelog +* Tue Apr 05 2016 Ralph Bean - 4.0.1-2 +- Added a python3 subpackage. +- Modernized python macros. + * Tue Apr 05 2016 Ralph Bean - 4.0.1-1 - Latest upstream.