diff --git a/.gitignore b/.gitignore index e67c56b..9d18371 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ zope.testing-3.9.5.tar.gz /zope.testing-3.10.0.tar.gz /zope.testing-3.10.2.tar.gz /zope.testing-3.10.3.tar.gz +/zope.testing-4.1.1.tar.gz diff --git a/python-zope-testing.spec b/python-zope-testing.spec index 58f3ef4..49a149a 100644 --- a/python-zope-testing.spec +++ b/python-zope-testing.spec @@ -1,19 +1,31 @@ +%global modname zope.testing + +%if 0%{?fedora} > 12 || 0%{?rhel} > 6 +%global with_python3 1 +%endif + Name: python-zope-testing -Version: 3.10.3 -Release: 2%{?dist} +Version: 4.1.1 +Release: 1%{?dist} Summary: Zope Testing Framework Group: Development/Languages License: ZPLv2.1 -URL: http://pypi.python.org/pypi/zope.testing -Source0: http://pypi.python.org/packages/source/z/zope.testing/zope.testing-%{version}.tar.gz +URL: http://pypi.python.org/pypi/%{modname} +Source0: http://pypi.python.org/packages/source/z/%{modname}/%{modname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python-devel BuildRequires: python-setuptools -# for testing BuildRequires: python-zope-exceptions BuildRequires: python-zope-interface +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-zope-exceptions +BuildRequires: python3-zope-interface +%endif + Requires: python-zope-exceptions Requires: python-zope-interface @@ -22,34 +34,83 @@ Requires: python-zope-interface This package provides a number of testing frameworks. It includes a flexible test runner, and supports both doctest and unittest. +%if 0%{?with_python3} +%package -n python3-zope-testing +Summary: Zope Testing Framework +Group: Development/Languages + +Requires: python3-zope-exceptions +Requires: python3-zope-interface + +%description -n python3-zope-testing +This package provides a number of testing frameworks. It includes a +flexible test runner, and supports both doctest and unittest. +%endif %prep -%setup -q -n zope.testing-%{version} +%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 -%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install -O1 --skip-build --root %{buildroot} +# __init__.py* are not needed since .pth file is used +rm -f %{buildroot}%{python3_sitelib}/zope/__init__.py* +popd +%endif + +%{__python} setup.py install -O1 --skip-build --root %{buildroot} # __init__.py* are not needed since .pth file is used -rm -f $RPM_BUILD_ROOT%{python_sitelib}/zope/__init__.py* +rm -f %{buildroot}%{python_sitelib}/zope/__init__.py* %check %{__python} setup.py test +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py test +popd +%endif %files %defattr(-,root,root,-) %doc COPYRIGHT.txt LICENSE.txt CHANGES.txt README.txt src/zope/testing/*.txt %{python_sitelib}/zope/testing/ %exclude %{python_sitelib}/zope/testing/*.txt -%{python_sitelib}/zope.testing-*.egg-info -%{python_sitelib}/zope.testing-*-nspkg.pth +%{python_sitelib}/%{modname}-*.egg-info +%{python_sitelib}/%{modname}-*-nspkg.pth +%if 0%{?with_python3} +%files -n python3-zope-testing +%defattr(-,root,root,-) +%doc COPYRIGHT.txt LICENSE.txt CHANGES.txt README.txt src/zope/testing/*.txt +%{python3_sitelib}/zope/testing/ +%exclude %{python3_sitelib}/zope/testing/*.txt +%{python3_sitelib}/%{modname}-*.egg-info +%{python3_sitelib}/%{modname}-*-nspkg.pth +%endif %changelog +* Tue Dec 11 2012 Ralph Bean - 4.1.1-1 +- Latest upstream release. +- Packaged a python3 subpackage. + * Sat Jul 21 2012 Fedora Release Engineering - 3.10.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild diff --git a/sources b/sources index 0048c59..301dba8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d9d6055c0a017271bcc3938c18ea23e8 zope.testing-3.10.3.tar.gz +2e3829841090d6adff718b8b73c87b6b zope.testing-4.1.1.tar.gz