From 1a38543a9bf35ba4feaa3d2f84742659742ae6ca Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Mon, 18 Jul 2016 19:47:40 -0400 Subject: [PATCH] Explicit python2 subpackage. --- python-zope-exceptions.spec | 72 ++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/python-zope-exceptions.spec b/python-zope-exceptions.spec index 46d6e5c..b671a0e 100644 --- a/python-zope-exceptions.spec +++ b/python-zope-exceptions.spec @@ -7,31 +7,35 @@ Summary: Zope Exceptions Name: python-zope-exceptions Version: 4.0.8 -Release: 3%{?dist} +Release: 4%{?dist} Source0: http://pypi.python.org/packages/source/z/%{modname}/%{modname}-%{version}.tar.gz License: ZPLv2.1 Group: Development/Libraries BuildArch: noarch URL: http://pypi.python.org/pypi/zope.exceptions +%description +This package contains exception interfaces and implementations which are so +general purpose that they don't belong in Zope application-specific packages. + +%package -n python2-zope-exceptions +Summary: Zope Exceptions +Group: Development/Libraries +%{?python_provide:%python_provide python2-zope-exceptions} + BuildRequires: python2-devel -BuildRequires: python-setuptools +BuildRequires: python2-setuptools %if 0%{?rhel} && 0%{?rhel} <= 6 BuildRequires: python-zope-interface4 Requires: python-zope-interface4 %else -BuildRequires: python-zope-interface -Requires: python-zope-interface +BuildRequires: python2-zope-interface +Requires: python2-zope-interface %endif -%if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-zope-interface -%endif -%description +%description -n python2-zope-exceptions This package contains exception interfaces and implementations which are so general purpose that they don't belong in Zope application-specific packages. @@ -39,8 +43,13 @@ general purpose that they don't belong in Zope application-specific packages. %package -n python3-zope-exceptions Summary: Zope Exceptions Group: Development/Libraries +%{?python_provide:%python_provide python3-zope-exceptions} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-zope-interface -Requires: python3-zope-interface +Requires: python3-zope-interface %description -n python3-zope-exceptions This package contains exception interfaces and implementations which are so @@ -52,48 +61,36 @@ general purpose that they don't belong in Zope application-specific packages. rm -rf %{modname}.egg-info -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -%endif - %build -%{__python} setup.py build +%{py2_build} %if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py build -popd +%{py3_build} %endif %install +%{py2_install} %if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py install -O1 --skip-build --root %{buildroot} -popd +%{py3_install} %endif -%{__python} setup.py install -O1 --skip-build --root %{buildroot} - # As of python-zope-exceptions-4.0.6, the tests require # python-zope-testrunner which has not yet been packaged. #%%check -#%%{__python} setup.py test +#%%{__python2} setup.py test # #%%if 0%%{?with_python3} -#pushd %%{py3dir} #%%{__python3} setup.py test -#popd #%%endif -%files +%files -n python2-zope-exceptions %defattr(-,root,root,-) %doc LICENSE.txt CHANGES.rst README.rst COPYRIGHT.txt -%{python_sitelib}/zope/exceptions/ -# Co-own %%{python_sitelib}/zope/ -%dir %{python_sitelib}/zope/ -%exclude %{python_sitelib}/zope/exceptions/tests/ -%{python_sitelib}/%{modname}-*.egg-info -%{python_sitelib}/%{modname}-*-nspkg.pth +%{python2_sitelib}/zope/exceptions/ +# Co-own %%{python2_sitelib}/zope/ +%dir %{python2_sitelib}/zope/ +%exclude %{python2_sitelib}/zope/exceptions/tests/ +%{python2_sitelib}/%{modname}-*.egg-info +%{python2_sitelib}/%{modname}-*-nspkg.pth %if 0%{?with_python3} %files -n python3-zope-exceptions @@ -106,8 +103,11 @@ popd %{python3_sitelib}/%{modname}-*-nspkg.pth %endif - %changelog +* Mon Jul 18 2016 Ralph Bean - 4.0.8-4 +- Explicit python2 subpackage. +- Modernized python macros. + * Thu Feb 04 2016 Fedora Release Engineering - 4.0.8-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild