Explicit python2 subpackage.

epel8
Ralph Bean 9 years ago
parent 47dabd9f53
commit 1a38543a9b

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

Loading…
Cancel
Save