diff --git a/python-zope-proxy.spec b/python-zope-proxy.spec index 232c57e..e826a5d 100644 --- a/python-zope-proxy.spec +++ b/python-zope-proxy.spec @@ -12,27 +12,27 @@ Name: python-zope-proxy Version: 4.1.6 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Generic Transparent Proxies Group: Development/Libraries License: ZPLv2.1 URL: https://pypi.python.org/pypi/%{modname}/ Source0: https://pypi.python.org/packages/source/z/%{modname}/%{modname}-%{version}.tar.gz -BuildRequires: python2-devel -BuildRequires: python-setuptools +%description +This package provides convenient functions for dealing with proxies. -# for test suite -BuildRequires: python-zope-testing -Requires: python-zope-interface +%package -n python2-zope-proxy +Summary: Generic Transparent Proxies +Group: Development/Libraries -%if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-zope-testing -%endif +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-zope-testing -%description +Requires: python2-zope-interface + +%description -n python2-zope-proxy This package provides convenient functions for dealing with proxies. %if 0%{?with_python3} @@ -40,6 +40,10 @@ This package provides convenient functions for dealing with proxies. Summary: Generic Transparent Proxies Group: Development/Libraries +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-zope-testing + Requires: python3-zope-interface %description -n python3-zope-proxy @@ -61,47 +65,33 @@ Development headers and libraries for %{name}. %setup -q -n %{modname}-%{version} rm -rf %{modname}.egg-info -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -%endif - %build -CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build +%{py2_build} %if 0%{?with_python3} -pushd %{py3dir} -CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build -popd +%{py3_build} %endif - - %install -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py install -O1 --skip-build --root %{buildroot} +%{py2_install} # Remove included source files +rm -f $RPM_BUILD_ROOT%{python2_sitearch}/zope/proxy/proxy.h +rm -f $RPM_BUILD_ROOT%{python2_sitearch}/zope/proxy/_zope_proxy_proxy.c + +%if 0%{?with_python3} +%{py3_install} rm -f $RPM_BUILD_ROOT%{python3_sitearch}/zope/proxy/proxy.h rm -f $RPM_BUILD_ROOT%{python3_sitearch}/zope/proxy/_zope_proxy_proxy.c rm -rf $RPM_BUILD_ROOT%{_includedir}/python3.*m*/ -popd %endif -%{__python2} setup.py install -O1 --skip-build --root %{buildroot} -# Remove included source files -rm -f $RPM_BUILD_ROOT%{python2_sitearch}/zope/proxy/proxy.h -rm -f $RPM_BUILD_ROOT%{python2_sitearch}/zope/proxy/_zope_proxy_proxy.c - %check %{__python2} setup.py test %if 0%{?with_python3} -pushd %{py3dir} %{__python3} setup.py test -popd %endif -%files +%files -n python2-zope-proxy %defattr(-,root,root,-) %doc CHANGES.rst README.rst COPYRIGHT.txt LICENSE.txt %{python2_sitearch}/zope/proxy/ @@ -121,6 +111,10 @@ popd %{_includedir}/python?.?/%{modname} %changelog +* Tue Jul 19 2016 Ralph Bean - 4.1.6-5 +- Explicit python2 subpackage. +- Modernize python macros. + * Tue Jul 19 2016 Fedora Release Engineering - 4.1.6-4 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages