diff --git a/python-zope-schema.spec b/python-zope-schema.spec index 397b913..f0a0933 100644 --- a/python-zope-schema.spec +++ b/python-zope-schema.spec @@ -20,33 +20,41 @@ Group: Development/Libraries BuildArch: noarch URL: http://pypi.python.org/pypi/zope.schema -BuildRequires: python-sphinx +%description +This package is a zope.interface extension for defining data schemas. + +%package -n python2-zope-schema +Summary: Zope 3 schemas +Group: Development/Libraries +%{?python_provide:%python_provide python2-zope-schema} + +BuildRequires: python2-sphinx BuildRequires: python2-devel -BuildRequires: python-setuptools +BuildRequires: python2-setuptools +BuildRequires: python2-zope-event # For tests BuildRequires: python-zope-testing BuildRequires: python-zope-interface -BuildRequires: python-zope-event - -%if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-zope-testing -BuildRequires: python3-zope-interface -BuildRequires: python3-zope-event -%endif -Requires: python-zope-interface -Requires: python-zope-event +Requires: python2-zope-interface +Requires: python2-zope-event -%description +%description -n python2-zope-schema This package is a zope.interface extension for defining data schemas. %if 0%{?with_python3} %package -n python3-zope-schema Summary: Zope 3 schemas Group: Development/Libraries +%{?python_provide:%python_provide python3-zope-schema} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +# For tests +BuildRequires: python3-zope-testing +BuildRequires: python3-zope-interface +BuildRequires: python3-zope-event Requires: python3-zope-interface Requires: python3-zope-event @@ -60,19 +68,11 @@ This package is a zope.interface extension for defining data schemas. rm -rf %{modname}.egg-info -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -%endif - %build -%{__python2} setup.py build - +%py2_build %if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py build -popd +%py3_build %endif # build Sphinx documents @@ -96,24 +96,20 @@ rm -fr html/{.buildinfo,.doctrees} %install %if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py install -O1 --skip-build --root %{buildroot} -popd +%py3_install %endif -%{__python2} setup.py install --root=%{buildroot} +%py2_install %check %{__python2} setup.py test %if 0%{?with_python3} -pushd %{py3dir} %{__python3} setup.py test -popd %endif -%files -%defattr(-,root,root,-) -%doc LICENSE.txt CHANGES.rst COPYRIGHT.txt README.rst +%files -n python2-zope-schema +%doc CHANGES.rst COPYRIGHT.txt README.rst %doc html/ +%license LICENSE.txt %{python2_sitelib}/zope/schema/ %exclude %{python2_sitelib}/zope/schema/tests/ %exclude %{python2_sitelib}/zope/schema/*.txt @@ -122,8 +118,9 @@ popd %if 0%{?with_python3} %files -n python3-zope-schema -%doc LICENSE.txt CHANGES.rst COPYRIGHT.txt README.rst +%doc CHANGES.rst COPYRIGHT.txt README.rst %doc html/ +%license LICENSE.txt %{python3_sitelib}/zope/schema/ %exclude %{python3_sitelib}/zope/schema/tests/ %exclude %{python3_sitelib}/zope/schema/*.txt @@ -133,6 +130,10 @@ popd %changelog +* Tue Jun 28 2016 Ralph Bean - 4.4.2-5 +- Modernize python macros. +- Add an explicit python2 subpackage. + * Thu Feb 04 2016 Fedora Release Engineering - 4.4.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild