%if 0%{?rhel} && 0%{?rhel} <= 6
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
%if 0%{?fedora}
%global with_python3 1
%endif
%global modname zope.proxy
Name: python-zope-proxy
Version: 4.1.6
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
%description
This package provides convenient functions for dealing with proxies.
%package -n python2-zope-proxy
Summary: Generic Transparent Proxies
Group: Development/Libraries
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-zope-testing
Requires: python2-zope-interface
%description -n python2-zope-proxy
This package provides convenient functions for dealing with proxies.
%if 0%{?with_python3}
%package -n python3-zope-proxy
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
This package provides convenient functions for dealing with proxies.
%endif
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: python2-devel
BuildArch: noarch
%description devel
Development headers and libraries for %{name}.
%prep
%setup -q -n %{modname}-%{version}
rm -rf %{modname}.egg-info
%build
%{py2_build}
%if 0%{?with_python3}
%{py3_build}
%endif
%install
%{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*/
%endif
%check
%{__python2} setup.py test
%if 0%{?with_python3}
%{__python3} setup.py test
%endif
%files -n python2-zope-proxy
%defattr(-,root,root,-)
%doc CHANGES.rst README.rst COPYRIGHT.txt LICENSE.txt
%{python2_sitearch}/zope/proxy/
%{python2_sitearch}/%{modname}-*.egg-info
%{python2_sitearch}/%{modname}-*-nspkg.pth
%if 0%{?with_python3}
%files -n python3-zope-proxy
%doc CHANGES.rst README.rst COPYRIGHT.txt LICENSE.txt
%{python3_sitearch}/zope/proxy/
%{python3_sitearch}/%{modname}-*.egg-info
%{python3_sitearch}/%{modname}-*-nspkg.pth
%endif
%files devel
%defattr(-,root,root,-)
%{_includedir}/python?.?/%{modname}
%changelog
* Tue Jul 19 2016 Ralph Bean <rbean@redhat.com> - 4.1.6-5
- Explicit python2 subpackage.
- Modernize python macros.
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.6-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.6-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Wed Sep 16 2015 Ralph Bean <rbean@redhat.com> - 4.1.6-1
- new version
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed May 20 2015 Ralph Bean <rbean@redhat.com> - 4.1.5-1
- new version
* Wed Aug 20 2014 Ralph Bean <rbean@redhat.com> - 4.1.4-1
- Latest upstream.
- Modernized python macros.
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 4.1.3-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
* Tue Jan 28 2014 Ralph Bean <rbean@redhat.com> - 4.1.3-1
- Latest upstream
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Feb 25 2013 Ralph Bean <rbean@redhat.com> - 4.1.1-2
- Remove the weird /python3.2mu/ dir contents.
* Mon Feb 25 2013 Ralph Bean <rbean@redhat.com> - 4.1.1-1
- Latest upstream.
- Added a python3 subpackage.
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Sep 6 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.6.1-4
- Include tests
- More comments
* Wed Sep 1 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.6.1-3
- Description revised
* Tue Aug 31 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.6.1-2
- Remove %%check section
- Group changed from Development/Languages to Development/Libraries
- BR: python-devel renamed to python2-devel, python-zope-testing removed
* Tue Aug 31 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.6.1-1
- Update to 3.6.1
- Requirement: python-zope-filesystem removed, python-zope-interface added
- Spec cleaned up
- -devel subpackage set to noarch, added python2-devel as requirement
- Include the license
* Mon Jun 7 2010 Conrad Meyer <konrad@tylerc.org> - 3.6.0-1
- Bump to latest version.
* Mon Feb 15 2010 Conrad Meyer <konrad@tylerc.org> - 3.5.0-3
- Nuke .c/.h files used to build C library from installed
files.
* Wed Dec 30 2009 Conrad Meyer <konrad@tylerc.org> - 3.5.0-2
- Move development files to devel subpackage.
- Use global instead of define.
* Sun Jul 5 2009 Conrad Meyer <konrad@tylerc.org> - 3.5.0-1
- Bump to latest version.
- Enable tests as zope.testing is in devel.
- Add missing BR on python-setuptools.
* Sun Dec 14 2008 Conrad Meyer <konrad@tylerc.org> - 3.4.2-1
- Initial package.