[python-zope-schema] Latest upstream. Added python3 subpackage.

Ralph Bean ralph at fedoraproject.org
Wed Feb 13 14:42:06 UTC 2013


commit 2a7bbf986d530ad7c1e4613a4b8b48669632381c
Author: Ralph Bean <rbean at redhat.com>
Date:   Wed Feb 13 09:41:37 2013 -0500

    Latest upstream.  Added python3 subpackage.

 .gitignore              |    1 +
 python-zope-schema.spec |   78 ++++++++++++++++++++++++++++++++++++++++++-----
 sources                 |    2 +-
 3 files changed, 72 insertions(+), 9 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 8d47a79..f296666 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 /zope.schema-3.7.1.tar.gz
 /zope.schema-3.8.0.tar.gz
 /zope.schema-3.8.1.zip
+/zope.schema-4.2.2.tar.gz
diff --git a/python-zope-schema.spec b/python-zope-schema.spec
index 7c92c95..f8fcc98 100644
--- a/python-zope-schema.spec
+++ b/python-zope-schema.spec
@@ -1,38 +1,74 @@
 %global modname zope.schema
 
+%if 0%{?fedora}
+%global with_python3 1
+%endif
+
 Summary: Zope 3 schemas
 Name: python-zope-schema
-Version: 3.8.1
-Release: 3%{?dist}
-Source0: http://pypi.python.org/packages/source/z/%{modname}/%{modname}-%{version}.zip
+Version: 4.2.2
+Release: 1%{?dist}
+Source0: http://pypi.python.org/packages/source/z/%{modname}/%{modname}-%{version}.tar.gz
 License: ZPLv2.1
 Group: Development/Libraries
 BuildArch: noarch
 URL: http://pypi.python.org/pypi/zope.schema
 
+BuildRequires: python-sphinx
+
 BuildRequires: python2-devel
 BuildRequires: python-setuptools
-BuildRequires: python-sphinx
-BuildRequires: /usr/bin/dos2unix
 # For tests
 BuildRequires: python-zope-testing
 BuildRequires: python-zope-interface
 BuildRequires: python-zope-event
 
+%if 0%{?with_python3}
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-zope-testing
+BuildRequires: python3-zope-interface
+BuildRequires: python3-zope-event
+%endif
+
 Requires: python-zope-interface
-# python-zope-event is noarch
 Requires: python-zope-event
 
 %description
 This package is a zope.interface extension for defining data schemas.
 
+%if 0%{?with_python3}
+%package -n python3-zope-schema
+Summary:        Zope 3 schemas
+Group:          Development/Libraries
+
+Requires: python3-zope-interface
+Requires: python3-zope-event
+
+%description -n python3-zope-schema
+This package is a zope.interface extension for defining data schemas.
+%endif
+
 %prep
 %setup -q -n %{modname}-%{version}
-dos2unix PKG-INFO *.txt ./src/zope/schema/*.txt ./src/zope/schema/*.py
+
+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
+
 # build Sphinx documents
 COPYRIGHT=`grep Author: PKG-INFO |sed -e 's/Author: //'`
 cat >src/zope/schema/conf.py <<END
@@ -53,10 +89,20 @@ sphinx-build -b html src/zope/schema/ html
 rm -fr html/{.buildinfo,.doctrees}
 
 %install
-%{__python} setup.py install --root=$RPM_BUILD_ROOT
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+popd
+%endif
+%{__python} setup.py install --root=%{buildroot}
 
 %check
 %{__python} setup.py test
+%if 0%{?with_python3}                                             
+pushd %{py3dir}
+%{__python3} setup.py test
+popd
+%endif
 
 %files
 %defattr(-,root,root,-)
@@ -68,8 +114,24 @@ rm -fr html/{.buildinfo,.doctrees}
 %{python_sitelib}/%{modname}-*.egg-info
 %{python_sitelib}/%{modname}-*-nspkg.pth
 
+%if 0%{?with_python3}
+%files -n python3-zope-schema
+%doc LICENSE.txt CHANGES.txt COPYRIGHT.txt README.txt
+%doc html/
+%{python3_sitelib}/zope/schema/
+%exclude %{python3_sitelib}/zope/schema/tests/
+%exclude %{python3_sitelib}/zope/schema/*.txt
+%{python3_sitelib}/%{modname}-*.egg-info
+%{python3_sitelib}/%{modname}-*-nspkg.pth
+%endif
+
 
 %changelog
+* Wed Feb 13 2013 Ralph Bean <rbean at redhat.com> - 4.2.2-1
+- Latest upstream.
+- Added Python3 subpackage.
+- Removed dos2unix references.  No longer needed.
+
 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.8.1-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 
diff --git a/sources b/sources
index 1ecca0c..fa147a0 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-dc7639db9f8c08fac0fd42db9c8cb9b9  zope.schema-3.8.1.zip
+e7e581af8193551831560a736a53cf58  zope.schema-4.2.2.tar.gz


More information about the scm-commits mailing list