Add an explicit python2 subpackage.

epel8
Ralph Bean 9 years ago
parent f5f48cbd35
commit c16e819da0

@ -12,7 +12,7 @@
Name: python-zope-testing
Version: 4.5.0
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Zope Testing Framework
Group: Development/Languages
License: ZPLv2.1
@ -20,23 +20,25 @@ URL: http://pypi.python.org/pypi/%{modname}
Source0: http://pypi.python.org/packages/source/z/%{modname}/%{modname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: python-zope-exceptions
BuildRequires: python-zope-interface
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-zope-exceptions
BuildRequires: python3-zope-interface
%endif
%description
This package provides a number of testing frameworks. It includes a
flexible test runner, and supports both doctest and unittest.
Requires: python-zope-exceptions
Requires: python-zope-interface
%package -n python2-zope-testing
Summary: Zope Testing Framework
Group: Development/Languages
%{?python_provide:%python_provide python2-zope-testing}
%description
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-zope-exceptions
BuildRequires: python2-zope-interface
Requires: python2-zope-exceptions
Requires: python2-zope-interface
%description -n python2-zope-testing
This package provides a number of testing frameworks. It includes a
flexible test runner, and supports both doctest and unittest.
@ -44,6 +46,12 @@ flexible test runner, and supports both doctest and unittest.
%package -n python3-zope-testing
Summary: Zope Testing Framework
Group: Development/Languages
%{?python_provide:%python_provide python3-zope-testing}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-zope-exceptions
BuildRequires: python3-zope-interface
Requires: python3-zope-exceptions
Requires: python3-zope-interface
@ -58,44 +66,29 @@ flexible test runner, and supports both doctest and unittest.
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
%install
%{py2_install}
# __init__.py* are not needed since .pth file is used
rm -f %{buildroot}%{python2_sitelib}/zope/__init__.py*
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
%{py3_install}
# __init__.py* are not needed since .pth file is used
rm -f %{buildroot}%{python3_sitelib}/zope/__init__.py*
popd
%endif
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
# __init__.py* are not needed since .pth file is used
rm -f %{buildroot}%{python2_sitelib}/zope/__init__.py*
%check
%{__python2} setup.py test
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py test
popd
%endif
%files
%files -n python2-zope-testing
%defattr(-,root,root,-)
%doc COPYRIGHT.txt LICENSE.txt CHANGES.rst README.rst src/zope/testing/*.txt
%{python2_sitelib}/zope/testing/
@ -114,6 +107,10 @@ popd
%endif
%changelog
* Mon Jul 18 2016 Ralph Bean <rbean@redhat.com> - 4.5.0-5
- Add an explicit python2 subpackage.
- Modernize python macros.
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.5.0-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

Loading…
Cancel
Save