[python-zope-proxy] Latest upstream and a py3 subpackage.

Ralph Bean ☃ ralph at fedoraproject.org
Mon Feb 25 18:19:01 UTC 2013


commit 1bc8be3e761401e9dc5c91d943bb142b09adcddd
Author: Ralph Bean <rbean at redhat.com>
Date:   Mon Feb 25 13:18:51 2013 -0500

    Latest upstream and a py3 subpackage.

 .gitignore             |    1 +
 python-zope-proxy.spec |   79 +++++++++++++++++++++++++++++++++++++++++-------
 sources                |    2 +-
 3 files changed, 70 insertions(+), 12 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index dcf86c4..429fb83 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /zope.proxy-3.6.1.zip
+/zope.proxy-4.1.1.tar.gz
diff --git a/python-zope-proxy.spec b/python-zope-proxy.spec
index ea7d4b0..6c0a941 100644
--- a/python-zope-proxy.spec
+++ b/python-zope-proxy.spec
@@ -1,22 +1,44 @@
+%if 0%{?fedora}
+%global with_python3 1
+%endif
+
+%global modname zope.proxy
+
 Name:           python-zope-proxy
-Version:        3.6.1
-Release:        8%{?dist}
+Version:        4.1.1
+Release:        1%{?dist}
 Summary:        Generic Transparent Proxies
 Group:          Development/Libraries
 License:        ZPLv2.1
-URL:            http://pypi.python.org/pypi/zope.proxy/
-Source0:        http://pypi.python.org/packages/source/z/zope.proxy/zope.proxy-%{version}.zip
+URL:            http://pypi.python.org/pypi/%{modname}/
+Source0:        http://pypi.python.org/packages/source/z/%{modname}/%{modname}-%{version}.tar.gz
 
 BuildRequires:  python2-devel
 BuildRequires:  python-setuptools
+
 # for test suite
 BuildRequires:  python-zope-testing
 Requires:       python-zope-interface
 
+%if 0%{?with_python3}
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+BuildRequires:  python3-zope-testing
+%endif
 
 %description
 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
+
+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}
@@ -29,17 +51,37 @@ BuildArch:      noarch
 %description devel
 Development headers and libraries for %{name}.
 
-
 %prep
-%setup -q -n zope.proxy-%{version}
+%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" %{__python} setup.py build
+%if 0%{?with_python3}
+pushd %{py3dir}
+CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
+popd
+%endif
+
 
 
 %install
-%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+# Remove included source files
+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.3m/
+popd
+%endif
+
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
 # Remove included source files
 rm -f $RPM_BUILD_ROOT%{python_sitearch}/zope/proxy/proxy.h
 rm -f $RPM_BUILD_ROOT%{python_sitearch}/zope/proxy/_zope_proxy_proxy.c
@@ -47,23 +89,38 @@ rm -f $RPM_BUILD_ROOT%{python_sitearch}/zope/proxy/_zope_proxy_proxy.c
 
 %check
 %{__python} setup.py test
-
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py test
+popd
+%endif
 
 %files
 %defattr(-,root,root,-)
 %doc CHANGES.txt README.txt COPYRIGHT.txt LICENSE.txt
 %{python_sitearch}/zope/proxy/
-%{python_sitearch}/zope.proxy-*.egg-info
-%{python_sitearch}/zope.proxy-*-nspkg.pth
+%{python_sitearch}/%{modname}-*.egg-info
+%{python_sitearch}/%{modname}-*-nspkg.pth
 
+%if 0%{?with_python3}
+%files -n python3-zope-proxy
+%doc CHANGES.txt README.txt 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?.?/zope.proxy
+%{_includedir}/python?.?/%{modname}
 
 
 
 %changelog
+* Mon Feb 25 2013 Ralph Bean <rbean at redhat.com> - 4.1.1-1
+- Latest upstream.
+- Added a python3 subpackage.
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.6.1-8
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 
diff --git a/sources b/sources
index 93449f2..c67bc1b 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a400b0a26624b17fa889dbcaa989d440  zope.proxy-3.6.1.zip
+c36691f0abee7573f4ddcc378603cefd  zope.proxy-4.1.1.tar.gz


More information about the scm-commits mailing list