Create explicit python2 subpackage.

epel8
Ralph Bean 9 years ago
parent 2a293a4165
commit f21b7dab3b

@ -4,26 +4,33 @@
Name: python-zope-event
Version: 4.2.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Zope Event Publication
Group: Development/Languages
License: ZPLv2.1
URL: http://pypi.python.org/pypi/zope.event/
# Upstream accidentally used strange version
Source0: http://pypi.python.org/packages/source/z/zope.event/zope.event-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-setuptools
%description
The zope.event package provides a simple event system. It provides
an event publishing system and a very simple event-dispatching system
on which more sophisticated event dispatching systems can be built.
(For example, a type-based event dispatching system that builds on
zope.event can be found in zope.component.)
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%endif
%package -n python2-zope-event
Summary: Zope Event Publication (Python 2)
%{?python_provide:%python_provide python2-zope-event}
BuildRequires: python-sphinx
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%description
BuildRequires: python2-sphinx
Requires: python2
%description -n python2-zope-event
The zope.event package provides a simple event system. It provides
an event publishing system and a very simple event-dispatching system
on which more sophisticated event dispatching systems can be built.
@ -35,6 +42,12 @@ This package contains the version for Python 2.
%if 0%{?with_python3}
%package -n python3-zope-event
Summary: Zope Event Publication (Python 3)
%{?python_provide:%python_provide python3-zope-event}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
Requires: python3
%description -n python3-zope-event
The zope.event package provides a simple event system. It provides
@ -50,18 +63,10 @@ This package contains the version for Python 3.
%setup -q -n zope.event-%{version}
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
# build the sphinx documents
@ -73,34 +78,32 @@ popd
%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}
%py2_install
%check
%{__python} setup.py test
%{__python2} setup.py test
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py test
popd
%endif
%files
%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
%files -n python2-zope-event
%doc CHANGES.rst COPYRIGHT.txt README.rst
%doc docs/_build/html/
%{python_sitelib}/zope/event/
%exclude %{python_sitelib}/zope/event/tests.py*
%dir %{python_sitelib}/zope/
#%{python_sitelib}/zope/__init__*
%{python_sitelib}/zope.event-*.egg-info
%{python_sitelib}/zope.event-*-nspkg.pth
%license LICENSE.txt
%{python2_sitelib}/zope/event/
%exclude %{python2_sitelib}/zope/event/tests.py*
%dir %{python2_sitelib}/zope/
#%{python2_sitelib}/zope/__init__*
%{python2_sitelib}/zope.event-*.egg-info
%{python2_sitelib}/zope.event-*-nspkg.pth
%if 0%{?with_python3}
%files -n python3-zope-event
%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
%doc docs/_build/html/
%license LICENSE.txt
%{python3_sitelib}/zope/event/
%exclude %{python3_sitelib}/zope/event/tests.py*
%exclude %{python3_sitelib}/zope/event/__pycache__/tests*
@ -111,6 +114,10 @@ popd
%endif
%changelog
* Tue Jun 28 2016 Ralph Bean <rbean@redhat.com> - 4.2.0-2
- Modernized python macros.
- Added an explicit python2 subpackage.
* Fri Feb 19 2016 Ralph Bean <rbean@redhat.com> - 4.2.0-1
- new version

Loading…
Cancel
Save