Create explicit python2 subpackage.

epel8
Ralph Bean 9 years ago
parent 2a293a4165
commit f21b7dab3b

@ -4,26 +4,33 @@
Name: python-zope-event Name: python-zope-event
Version: 4.2.0 Version: 4.2.0
Release: 1%{?dist} Release: 2%{?dist}
Summary: Zope Event Publication Summary: Zope Event Publication
Group: Development/Languages Group: Development/Languages
License: ZPLv2.1 License: ZPLv2.1
URL: http://pypi.python.org/pypi/zope.event/ 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 Source0: http://pypi.python.org/packages/source/z/zope.event/zope.event-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
BuildRequires: python-devel %description
BuildRequires: python-setuptools 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} %package -n python2-zope-event
BuildRequires: python3-devel Summary: Zope Event Publication (Python 2)
BuildRequires: python3-setuptools %{?python_provide:%python_provide python2-zope-event}
%endif
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 The zope.event package provides a simple event system. It provides
an event publishing system and a very simple event-dispatching system an event publishing system and a very simple event-dispatching system
on which more sophisticated event dispatching systems can be built. 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} %if 0%{?with_python3}
%package -n python3-zope-event %package -n python3-zope-event
Summary: Zope Event Publication (Python 3) 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 %description -n python3-zope-event
The zope.event package provides a simple event system. It provides 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} %setup -q -n zope.event-%{version}
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
# build the sphinx documents # build the sphinx documents
@ -73,34 +78,32 @@ popd
%install %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} %py2_install
%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-event
%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst %doc CHANGES.rst COPYRIGHT.txt README.rst
%doc docs/_build/html/ %doc docs/_build/html/
%{python_sitelib}/zope/event/ %license LICENSE.txt
%exclude %{python_sitelib}/zope/event/tests.py* %{python2_sitelib}/zope/event/
%dir %{python_sitelib}/zope/ %exclude %{python2_sitelib}/zope/event/tests.py*
#%{python_sitelib}/zope/__init__* %dir %{python2_sitelib}/zope/
%{python_sitelib}/zope.event-*.egg-info #%{python2_sitelib}/zope/__init__*
%{python_sitelib}/zope.event-*-nspkg.pth %{python2_sitelib}/zope.event-*.egg-info
%{python2_sitelib}/zope.event-*-nspkg.pth
%if 0%{?with_python3} %if 0%{?with_python3}
%files -n python3-zope-event %files -n python3-zope-event
%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
%doc docs/_build/html/ %doc docs/_build/html/
%license LICENSE.txt
%{python3_sitelib}/zope/event/ %{python3_sitelib}/zope/event/
%exclude %{python3_sitelib}/zope/event/tests.py* %exclude %{python3_sitelib}/zope/event/tests.py*
%exclude %{python3_sitelib}/zope/event/__pycache__/tests* %exclude %{python3_sitelib}/zope/event/__pycache__/tests*
@ -111,6 +114,10 @@ popd
%endif %endif
%changelog %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 * Fri Feb 19 2016 Ralph Bean <rbean@redhat.com> - 4.2.0-1
- new version - new version

Loading…
Cancel
Save