[python-zope-deprecation] More recent version and a new python3 subpackage.

Ralph Bean ralph at fedoraproject.org
Wed Nov 28 18:40:28 UTC 2012


commit 2d5999c9719a7a401a89d85e0423f4d58750e307
Author: Ralph Bean <rbean at redhat.com>
Date:   Wed Nov 28 13:40:21 2012 -0500

    More recent version and a new python3 subpackage.

 .gitignore                   |    1 +
 python-zope-deprecation.spec |   77 +++++++++++++++++++++++++++++++++++++-----
 sources                      |    2 +-
 3 files changed, 70 insertions(+), 10 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 6ba2a9f..0ac9539 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /zope.deprecation-3.4.0.tar.gz
+/zope.deprecation-3.5.1.tar.gz
diff --git a/python-zope-deprecation.spec b/python-zope-deprecation.spec
index e6ef959..d5e7ee8 100644
--- a/python-zope-deprecation.spec
+++ b/python-zope-deprecation.spec
@@ -1,10 +1,14 @@
 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
 
+%if 0%{?fedora} > 12 || 0%{?rhel} > 6
+%global with_python3 1
+%endif
+
 %define modname zope.deprecation
 
 Name:           python-zope-deprecation
-Version:        3.4.0
-Release:        4%{?dist}
+Version:        3.5.1
+Release:        1%{?dist}
 Summary:        Zope 3 Deprecation Infrastructure
 
 Group:          Development/Libraries
@@ -15,34 +19,89 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 
 BuildRequires:  python-setuptools-devel
-BuildRequires:  python-zope-testing
+
+%if 0%{?with_python3}
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+%endif
 
 %description
 This package provides a simple function called 'deprecated(names, reason)' to
 deprecate the previously mentioned Python objects.
 
+%if 0%{?with_python3}
+%package -n python3-zope-deprecation
+Summary:        Zope 3 Deprecation Infrastructure
+Group:          Development/Libraries
+
+%description -n python3-zope-deprecation
+This package provides a simple function called 'deprecated(names, reason)' to
+deprecate the previously mentioned Python objects.
+%endif
+
 %prep
 %setup -q -n %{modname}-%{version}
 
+rm -rf %{modname}.egg-info
+
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif
+
 %build
 %{__python} setup.py build
 
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif
+
 %install
-rm -rf %{buildroot}
-%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
+rm -f %{buildroot}%{python3_sitelib}/zope/deprecation/README.txt
+rm -f %{buildroot}%{python3_sitelib}/zope/deprecation/DEPENDENCIES.cfg
+rm -f %{buildroot}%{python3_sitelib}/zope/deprecation/tests.py*
+popd
+%endif
+
+%{__python} setup.py install -O1 --skip-build --root=%{buildroot}
 rm -f %{buildroot}%{python_sitelib}/zope/deprecation/README.txt
 rm -f %{buildroot}%{python_sitelib}/zope/deprecation/DEPENDENCIES.cfg
 rm -f %{buildroot}%{python_sitelib}/zope/deprecation/tests.py*
 
-%clean
-rm -rf %{buildroot}
+%check
+%{__python} setup.py test
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py test
+popd
+%endif
 
 %files
-%defattr(-,root,root,-)
 %doc README.txt
-%{python_sitelib}/*
+%{python_sitelib}/zope/deprecation/
+%{python_sitelib}/%{modname}-%{version}-*
+
+%if 0%{?with_python3}
+%files -n python3-zope-deprecation
+%doc README.txt
+%{python3_sitelib}/zope/deprecation/
+%{python3_sitelib}/%{modname}-%{version}-*
+%endif
+
 
 %changelog
+* Wed Nov 28 2012 Ralph Bean <rbean at redhat.com> - 3.5.1-1
+- More modern upstream version.
+- Added python3 packaging.
+- Removed unnecessary defattr and clean section.
+- Added check section.
+
 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.4.0-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 
diff --git a/sources b/sources
index 2f45a09..121b4a8 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-453a5707987c8b8eb1f58ed948119fce  zope.deprecation-3.4.0.tar.gz
+836cfea5fad548cd5a0d9af1300ec05e  zope.deprecation-3.5.1.tar.gz


More information about the scm-commits mailing list