[python-persistent] Initial import.

Jerry James jjames at fedoraproject.org
Wed Aug 6 18:56:19 UTC 2014


commit 5676ca458e31cd528512d6b8a8d1ad2b4c7aba88
Author: Jerry James <jamesjer at betterlinux.com>
Date:   Wed Aug 6 12:56:08 2014 -0600

    Initial import.

 .gitignore             |    1 +
 python-persistent.spec |  181 ++++++++++++++++++++++++++++++++++++++++++++++++
 sources                |    1 +
 3 files changed, 183 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..5a0d224 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/persistent-4.0.8.tar.gz
diff --git a/python-persistent.spec b/python-persistent.spec
new file mode 100644
index 0000000..62cfe32
--- /dev/null
+++ b/python-persistent.spec
@@ -0,0 +1,181 @@
+%if 0%{?fedora} >= 12 || 0%{?rhel} >= 8
+%global with_py3 1
+%endif
+
+%global pkgname persistent
+
+Name:           python-%{pkgname}
+Version:        4.0.8
+Release:        2%{?dist}
+Summary:        Translucent persistent python objects
+
+License:        ZPLv2.1
+URL:            http://www.zodb.org/
+Source0:        https://pypi.python.org/packages/source/p/%{pkgname}/%{pkgname}-%{version}.tar.gz
+
+BuildRequires:  python-devel
+BuildRequires:  python-nose
+BuildRequires:  python-repoze-sphinx-autointerface
+BuildRequires:  python-setuptools
+BuildRequires:  python-sphinx
+BuildRequires:  python-zope-interface
+
+%if 0%{?with_py3}
+BuildRequires:  python3-devel
+BuildRequires:  python3-nose
+BuildRequires:  python3-repoze-sphinx-autointerface
+BuildRequires:  python3-setuptools
+BuildRequires:  python3-sphinx
+BuildRequires:  python3-zope-interface
+%endif
+
+Requires:       python-zope-interface%{?_isa}
+
+%global common_desc                                                        \
+This package contains a generic persistence implementation for Python.  It \
+forms the core protocol for making objects interact transparently with a   \
+database such as python-ZODB3.
+
+%description
+%{common_desc}
+
+%package devel
+Summary:        Development files for %{name}
+Requires:       %{name} = %{version}-%{release}
+BuildArch:      noarch
+
+# Can be removed once Fedora 20 reaches EOL
+Obsoletes:      python-ZODB3-devel < 3.11.0-1%{?dist}
+Provides:       python-ZODB3-devel = %{version}-%{release}
+
+%description devel
+Header files for building applications that use %{name}.
+
+%package doc
+Summary:        Documentation for %{name}
+Requires:       %{name} = %{version}-%{release}
+BuildArch:      noarch
+
+%description doc
+Documentation for %{name}.
+
+%if 0%{?with_py3}
+%package -n python3-%{pkgname}
+Summary:        Translucent persistent python objects
+Requires:       python3-zope-interface%{?_isa}
+
+%description -n python3-%{pkgname}
+%{common_desc}
+
+%package -n python3-%{pkgname}-devel
+Summary:        Development files for python3-%{pkgname}
+Requires:       python3-%{pkgname} = %{version}-%{release}
+BuildArch:      noarch
+
+%description -n python3-%{pkgname}-devel
+Header files for building applications that use python3-%{pkgname}.
+
+%package -n python3-%{pkgname}-doc
+Summary:        Documentation for %{name}
+Requires:       %{name} = %{version}-%{release}
+BuildArch:      noarch
+
+%description -n python3-%{pkgname}-doc
+Documentation for %{name}.
+%endif
+
+%prep
+%setup -q -c
+
+# Remove prebuilt egg and documentation
+rm -fr %{pkgname}-%{version}/%{pkgname}.egg-info \
+  %{pkgname}-%{version}/docs/_build
+
+%if 0%{?with_py3}
+# Prepare for a python3 build
+cp -a %{pkgname}-%{version} python3-%{pkgname}-%{version}
+%endif
+
+%build
+# Python 2 build
+pushd %{pkgname}-%{version}
+%{__python2} setup.py build
+PYTHONPATH=$(echo $PWD/build/lib.linux-*) make -C docs html
+popd
+
+%if 0%{?with_py3}
+# Python 3 build
+pushd python3-%{pkgname}-%{version}
+%{__python3} setup.py build
+PYTHONPATH=$(echo $PWD/build/lib.linux-*) make -C docs html \
+  SPHINXBUILD=%{_bindir}/sphinx-build-3.*
+popd
+%endif
+
+%install
+# Python 2 install
+pushd %{pkgname}-%{version}
+%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
+popd
+
+%if 0%{?with_py3}
+# Python 3 install
+pushd python3-%{pkgname}-%{version}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+popd
+%endif
+
+# Remove unwanted documentation and source files; fix permissions (Python 2)
+rm -f %{pkgname}-%{version}/docs/_build/html/.buildinfo
+rm -f %{buildroot}%{python2_sitearch}/%{pkgname}/*.{c,h}
+chmod 0755 %{buildroot}%{python2_sitearch}/%{pkgname}/*.so
+
+%if 0%{?with_py3}
+# Remove unwanted documentation and source files; fix permissions (Python 3)
+rm -f python3-%{pkgname}-%{version}/docs/_build/html/.buildinfo
+rm -f %{buildroot}%{python3_sitearch}/%{pkgname}/*.{c,h}
+chmod 0755 %{buildroot}%{python3_sitearch}/%{pkgname}/*.so
+%endif
+
+%check
+# Python 2 tests
+pushd %{pkgname}-%{version}
+%{__python2} setup.py test
+popd
+
+%if 0%{?with_py3}
+# Python 3 tests
+pushd python3-%{pkgname}-%{version}
+%{__python3} setup.py test
+popd
+%endif
+
+%files
+%license %{pkgname}-%{version}/LICENSE.txt
+%{python2_sitearch}/%{pkgname}*
+
+%files devel
+%{_includedir}/python2.*/%{pkgname}/
+
+%files doc
+%doc %{pkgname}-%{version}/docs/_build/html/*
+
+%if 0%{?with_py3}
+%files -n python3-%{pkgname}
+%license %{pkgname}-%{version}/LICENSE.txt
+%{python3_sitearch}/%{pkgname}*
+
+%files -n python3-%{pkgname}-devel
+%{_includedir}/python3.*/%{pkgname}/
+
+%files -n python3-%{pkgname}-doc
+%doc python3-%{pkgname}-%{version}/docs/_build/html/*
+%endif
+
+%changelog
+* Tue Jun  3 2014 Jerry James <loganjerry at gmail.com> - 4.0.8-2
+- Conditionalize python 3 build
+- Remove %%clean script
+
+* Thu May 29 2014 Jerry James <loganjerry at gmail.com> - 4.0.8-1
+- Initial RPM (bz 1102950)
diff --git a/sources b/sources
index e69de29..f46987a 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+2942f1ca7764b1bef8d48fa0d9a236b7  persistent-4.0.8.tar.gz


More information about the scm-commits mailing list