[python-ZODB3] Update to 3.11.0.

Jerry James jjames at fedoraproject.org
Tue Oct 21 01:11:14 UTC 2014


commit 74909a2df6e303067a2ce9d2a3863356f15b5f05
Author: Jerry James <jamesjer at betterlinux.com>
Date:   Mon Oct 20 19:10:51 2014 -0600

    Update to 3.11.0.

 .gitignore        |    2 +-
 python-ZODB3.spec |  191 +++++++++++++++++++++++++++--------------------------
 sources           |    2 +-
 3 files changed, 98 insertions(+), 97 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index fd9a990..763a535 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
-/ZODB3-3.10.4.tar.gz
 /ZODB3-3.10.5.tar.gz
+/ZODB3-3.11.0.tar.gz
diff --git a/python-ZODB3.spec b/python-ZODB3.spec
index 5f49471..c16e388 100644
--- a/python-ZODB3.spec
+++ b/python-ZODB3.spec
@@ -1,125 +1,126 @@
-Name:           python-ZODB3
-Version:        3.10.5
-Release:        7%{?dist}
+%if 0%{?fedora} >= 12 || 0%{?rhel} >= 8
+%global with_py3 1
+%endif
+
+%global pkgname ZODB3
+
+Name:           python-%{pkgname}
+Version:        3.11.0
+Release:        1%{?dist}
 Summary:        Zope Object Database: Object Database and Persistence
 Group:          Development/Libraries
 License:        ZPLv2.1
 URL:            http://www.zodb.org/
-Source0:        http://pypi.python.org/packages/source/Z/ZODB3/ZODB3-%{version}%{?prerel}.tar.gz
+Source0:        http://pypi.python.org/packages/source/Z/%{pkgname}/%{pkgname}-%{version}.tar.gz
+BuildArch:      noarch
 
-BuildRequires:  python2-devel
+BuildRequires:  python-BTrees
+BuildRequires:  python-devel
+BuildRequires:  python-persistent
 BuildRequires:  python-setuptools
-# The next 2 BRs are needed for tests
-BuildRequires:  python-six
 BuildRequires:  python-transaction
-BuildRequires:  python-zc-lockfile
-BuildRequires:  python-ZConfig
-BuildRequires:  python-zdaemon
-BuildRequires:  python-zope-event
-BuildRequires:  python-zope-interface
-BuildRequires:  python-zope-proxy
-BuildRequires:  python-manuel
-BuildRequires:  python-zope-testing
-Requires:       python-setuptools
+BuildRequires:  python-ZEO
+BuildRequires:  python-ZODB
+
+%if 0%{?with_py3}
+BuildRequires:  python3-BTrees
+BuildRequires:  python3-devel
+BuildRequires:  python3-persistent
+BuildRequires:  python3-setuptools
+BuildRequires:  python3-transaction
+BuildRequires:  python3-ZEO
+BuildRequires:  python3-ZODB
+%endif
+
+Requires:       python-BTrees
+Requires:       python-persistent
 Requires:       python-transaction
-Requires:       python-zc-lockfile
-Requires:       python-ZConfig
-Requires:       python-zdaemon
-Requires:       python-zope-event
-Requires:       python-zope-interface
-Requires:       python-zope-proxy
-
-%global __provides_exclude_from ^%{python_sitearch}/.*\\.so$
-
-%description
-The Zope Object Database provides an object-oriented database for Python
-that provides a high-degree of transparency. Applications can take
-advantage of object database features with few, if any, changes to
-application logic. ZODB includes features such as a pluggable storage
+Requires:       python-ZEO
+Requires:       python-ZODB
+
+%global common_desc                                                      \
+The Zope Object Database provides an object-oriented database for Python \
+that provides a high-degree of transparency. Applications can take       \
+advantage of object database features with few, if any, changes to       \
+application logic. ZODB includes features such as a pluggable storage    \
 interface, rich transaction support, and undo.
 
-%package devel
-Summary:  Developer files for %{name}
-Group:    Development/Libraries
-Requires: %{name} = %{version}-%{release}
-Requires: python2-devel
-BuildArch: noarch
+%description
+%{common_desc}
 
-%description devel
-Files for developing applications using Python extensions of ZODB.
+%if 0%{?with_py3}
+%package -n python3-%{pkgname}
+Summary:        Client-server storage implementation for ZODB
+Requires:       python3-BTrees
+Requires:       python3-persistent
+Requires:       python3-transaction
+Requires:       python3-ZEO
+Requires:       python3-ZODB
 
+%description -n python3-%{pkgname}
+%{common_desc}
+%endif
 
 %prep
-%setup -q -n ZODB3-%{version}%{?prerel}
-for File in src/ZEO/zeoctl.py src/{ZODB,ZEO}/scripts/*.py ; do
-  sed -i.orig -e '/^#! *\//, 1d' $File
-  touch -r ${File}.orig $File
-  rm ${File}.orig
+%setup -q -c
+
+# Remove prebuilt egg
+rm -fr %{pkgname}-%{version}/%{pkgname}.egg-info
+
+# Fix encodings
+for fil in %{pkgname}-%{version}/HISTORY.txt; do
+  iconv -f ISO-8859-1 -t UTF-8 $fil > $fil.utf8
+  touch -r $fil $fil.utf8
+  mv -f $fil.utf8 $fil
 done
 
+%if 0%{?with_py3}
+# Prepare for a python3 build
+cp -a %{pkgname}-%{version} python3-%{pkgname}-%{version}
+%endif
 
 %build
-CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
+# Python 2 build
+pushd %{pkgname}-%{version}
+%{__python2} setup.py build
+popd
 
+%if 0%{?with_py3}
+# Python 3 build
+pushd python3-%{pkgname}-%{version}
+%{__python3} setup.py build
+popd
+%endif
 
 %install
-%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
-
-pushd $RPM_BUILD_ROOT%{python_sitearch}
-# remove contained source files
-find . \( -name '*.c' -o -name '*.h' \) -type f -print0 | xargs -0 rm -fv
-
-# deal with documents
-mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/
-DOCDIR=$RPM_BUILD_ROOT%{_docdir}/%{name}/
-for FILE in `find . -name '*.txt'`; do
-  DIR=${FILE%/*.*}
-  # If a file in */tests/ directory, move it to an upper one.
-  DIR=${DIR%/tests}
-  # Don't move the files in the egg info directory
-  if echo $DIR| grep -v egg-info >/dev/null; then
-     if [ $DIR != . -a ! -d $DOCDIR$DIR ]; then
-        mkdir -p $DOCDIR$DIR
-     fi
-     if [ ! -e $DOCDIR$DIR/${FILE##.*/} ]; then
-        mv $FILE $DOCDIR$DIR
-     else
-        echo "name conflicts occur in documentation"
-        exit 1
-     fi
-  fi
-done
-
+# Python 2 install
+pushd %{pkgname}-%{version}
+%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
 popd
 
-iconv -f ISO-8859-1 -t UTF-8 src/CHANGES.txt >$DOCDIR/CHANGES.txt
-touch -r src/CHANGES.txt $DOCDIR/CHANGES.txt
-cp -p COPYRIGHT.txt LICENSE.txt HISTORY.txt README.txt \
-   doc/* $DOCDIR
-
-%check
-python setup.py test
+%if 0%{?with_py3}
+# Python 3 install
+pushd python3-%{pkgname}-%{version}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+popd
+%endif
 
 %files
-%{_docdir}/%{name}/
-%{python_sitearch}/ZODB/
-%exclude %{python_sitearch}/ZODB/tests/
-%exclude %{python_sitearch}/ZODB/scripts/tests/
-%exclude %{python_sitearch}/ZODB/FileStorage/tests.py*
-%{python_sitearch}/ZODB3-*.egg-info
-%{_bindir}/*
-%{python_sitearch}/BTrees/
-%exclude %{python_sitearch}/BTrees/tests/
-%{python_sitearch}/persistent/
-%exclude %{python_sitearch}/persistent/tests/
-%{python_sitearch}/ZEO/
-%exclude %{python_sitearch}/ZEO/tests/
-%exclude %{python_sitearch}/ZEO/scripts/tests.py*
-
-%files devel
-%{_includedir}/python?.?/ZODB3
+%doc %{pkgname}-%{version}/CHANGES.txt %{pkgname}-%{version}/HISTORY.txt
+%doc %{pkgname}-%{version}/README.txt
+%{python2_sitelib}/%{pkgname}*
+
+%if 0%{?with_py3}
+%files -n python3-%{pkgname}
+%doc %{pkgname}-%{version}/CHANGES.txt %{pkgname}-%{version}/HISTORY.txt
+%doc %{pkgname}-%{version}/README.txt
+%{python3_sitelib}/%{pkgname}*
+%endif
 
 %changelog
+* Mon Oct 20 2014 Jerry James <loganjerry at gmail.com> - 3.11.0-1
+- Update to 3.11.0
+
 * Sun Aug 17 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.10.5-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 
diff --git a/sources b/sources
index cdc135a..7a2e455 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-6f180c6897a1820948fee2a6290503cd  ZODB3-3.10.5.tar.gz
+21975c1609296e7834e8cf4025af3039  ZODB3-3.11.0.tar.gz


More information about the scm-commits mailing list