diff --git a/python-ZODB3.spec b/python-ZODB3.spec index 33b1e0a..38b2f97 100644 --- a/python-ZODB3.spec +++ b/python-ZODB3.spec @@ -2,16 +2,16 @@ %global with_py3 1 %endif -%global pkgname ZODB3 +%global srcname ZODB3 -Name: python-%{pkgname} +Name: python-%{srcname} Version: 3.11.0 Release: 3%{?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/%{pkgname}/%{pkgname}-%{version}.tar.gz +Source0: http://pypi.python.org/packages/source/Z/%{srcname}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python-BTrees @@ -32,12 +32,6 @@ BuildRequires: python3-ZEO BuildRequires: python3-ZODB %endif -Requires: python-BTrees -Requires: python-persistent -Requires: python-transaction -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 \ @@ -48,8 +42,21 @@ interface, rich transaction support, and undo. %description %{common_desc} +%package -n python2-%{srcname} +Summary: Client-server storage implementation for ZODB +Requires: python-BTrees +Requires: python-persistent +Requires: python-transaction +Requires: python-ZEO +Requires: python-ZODB + +%{?python_provide:%python_provide python2-%{srcname}} + +%description -n python2-%{srcname} +%{common_desc} + %if 0%{?with_py3} -%package -n python3-%{pkgname} +%package -n python3-%{srcname} Summary: Client-server storage implementation for ZODB Requires: python3-BTrees Requires: python3-persistent @@ -57,7 +64,9 @@ Requires: python3-transaction Requires: python3-ZEO Requires: python3-ZODB -%description -n python3-%{pkgname} +%{?python_provide:%python_provide python3-%{srcname}} + +%description -n python3-%{srcname} %{common_desc} %endif @@ -65,10 +74,10 @@ Requires: python3-ZODB %setup -q -c # Remove prebuilt egg -rm -fr %{pkgname}-%{version}/%{pkgname}.egg-info +rm -fr %{srcname}-%{version}/%{srcname}.egg-info # Fix encodings -for fil in %{pkgname}-%{version}/HISTORY.txt; do +for fil in %{srcname}-%{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 @@ -76,48 +85,51 @@ done %if 0%{?with_py3} # Prepare for a python3 build -cp -a %{pkgname}-%{version} python3-%{pkgname}-%{version} +cp -a %{srcname}-%{version} python3-%{srcname}-%{version} %endif %build # Python 2 build -pushd %{pkgname}-%{version} -%{__python2} setup.py build +pushd %{srcname}-%{version} +%py2_build popd %if 0%{?with_py3} # Python 3 build -pushd python3-%{pkgname}-%{version} -%{__python3} setup.py build +pushd python3-%{srcname}-%{version} +%py3_build popd %endif %install # Python 2 install -pushd %{pkgname}-%{version} -%{__python2} setup.py install -O1 --skip-build --root %{buildroot} +pushd %{srcname}-%{version} +%py2_install popd %if 0%{?with_py3} # Python 3 install -pushd python3-%{pkgname}-%{version} -%{__python3} setup.py install -O1 --skip-build --root %{buildroot} +pushd python3-%{srcname}-%{version} +%py3_install popd %endif -%files -%doc %{pkgname}-%{version}/CHANGES.txt %{pkgname}-%{version}/HISTORY.txt -%doc %{pkgname}-%{version}/README.txt -%{python2_sitelib}/%{pkgname}* +%files -n python2-%{srcname} +%doc %{srcname}-%{version}/CHANGES.txt %{srcname}-%{version}/HISTORY.txt +%doc %{srcname}-%{version}/README.txt +%{python2_sitelib}/%{srcname}* %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}* +%files -n python3-%{srcname} +%doc %{srcname}-%{version}/CHANGES.txt %{srcname}-%{version}/HISTORY.txt +%doc %{srcname}-%{version}/README.txt +%{python3_sitelib}/%{srcname}* %endif %changelog +* Tue Feb 2 2016 Jerry James - 3.11.0-3 +- Comply with latest python packaging guidelines + * Tue Nov 10 2015 Fedora Release Engineering - 3.11.0-3 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5