diff --git a/python-zope-component.spec b/python-zope-component.spec index 0d73a0b..8ccca62 100644 --- a/python-zope-component.spec +++ b/python-zope-component.spec @@ -6,13 +6,6 @@ This package represents the core of the Zope Component Architecture. \ Together with the 'zope.interface' package, it provides facilities for \ defining, registering and looking up components. -# EPEL7 support: Python2 packages prefix is unversioned. -%if 0%{?rhel} && 0%{?rhel} <= 7 -%global py2_namespace python -%else -%global py2_namespace python2 -%endif - Summary: %{summary} Name: python-%{pkgname} @@ -25,10 +18,15 @@ Group: Development/Libraries BuildArch: noarch URL: http://pypi.python.org/pypi/zope.component +# Python 2 BuildRequires: python2-devel -BuildRequires: %{py2_namespace}-setuptools -BuildRequires: %{py2_namespace}-sphinx -BuildRequires: %{py2_namespace}-repoze-sphinx-autointerface +BuildRequires: python-setuptools +BuildRequires: python-sphinx +BuildRequires: python-repoze-sphinx-autointerface + +%{?python_provide:%python_provide python-%{pkgname}} +Requires: python-zope-interface +Requires: python-zope-event # Python3 BuildRequires: python3-pkgversion-macros @@ -49,27 +47,9 @@ BuildRequires: python%{python3_other_pkgversion}-setuptools #BuildRequires: python-zope-security #BuildRequires: python-zope-testrunner -%if %{py2_namespace} == python -%{?python_provide:%python_provide %{py2_namespace}-%{pkgname}} -Requires: %{py2_namespace}-zope-interface -Requires: %{py2_namespace}-zope-event -%endif - %description %{_description} -# Python 2 -%if %{py2_namespace} != python -%package -n %{py2_namespace}-%{pkgname} -Summary: %{summary} -%{?python_provide:%python_provide %{py2_namespace}-%{pkgname}} -Requires: %{py2_namespace}-zope-interface -Requires: %{py2_namespace}-zope-event - -%description -n %{py2_namespace}-%{pkgname} %{_description} -%endif - - # Python 3 %package -n python%{python3_pkgversion}-%{pkgname} Summary: %{summary} @@ -125,11 +105,13 @@ rm -fr docs/_build/html/{.buildinfo,.doctrees} #%%endif -%files -n %{py2_namespace}-%{pkgname} +%files %defattr(-,root,root,-) %license LICENSE.txt COPYRIGHT.txt %doc CHANGES.rst README.rst %doc docs/_build/html/ +# Co-own %%{python2_sitelib}/zope/ +%dir %{python2_sitelib}/zope/ %{python2_sitelib}/zope/component/ %{python2_sitelib}/%{modname}-*.egg-info %{python2_sitelib}/%{modname}-*-nspkg.pth @@ -139,6 +121,8 @@ rm -fr docs/_build/html/{.buildinfo,.doctrees} %license LICENSE.txt COPYRIGHT.txt %doc CHANGES.rst README.rst %doc docs/_build/html/ +# Co-own %%{python3_sitelib}/zope/ +%dir %{python3_sitelib}/zope/ %{python3_sitelib}/zope/component/ %exclude %{python3_sitelib}/zope/component/*.txt %{python3_sitelib}/%{modname}-*.egg-info @@ -149,6 +133,8 @@ rm -fr docs/_build/html/{.buildinfo,.doctrees} %license LICENSE.txt COPYRIGHT.txt %doc CHANGES.rst README.rst %doc docs/_build/html/ +# Co-own %%{python3_other_sitelib}/zope/ +%dir %{python3_other_sitelib}/zope/ %{python3_other_sitelib}/zope/component/ %exclude %{python3_other_sitelib}/zope/component/*.txt %{python3_other_sitelib}/%{modname}-*.egg-info @@ -159,7 +145,7 @@ rm -fr docs/_build/html/{.buildinfo,.doctrees} %changelog * Tue Apr 25 2017 Aurelien Bompard - 1:4.1.0-3 - Use the included documentation. -- Re-add the Requires for the python- subpackage. +- Simplify the building of the Python2 version. * Mon Apr 24 2017 Aurelien Bompard - 1:4.1.0-2 - Enable creation of the Python 3 packages in EPEL, now that the dependencies