diff --git a/python-fixtures.spec b/python-fixtures.spec index 4caeddb..f9f1f15 100644 --- a/python-fixtures.spec +++ b/python-fixtures.spec @@ -1,9 +1,13 @@ -# Created by pyp2rpm-0.5.2 %global pypi_name fixtures +%if 0%{?fedora} > 12 || 0%{?rhel} > 6 +%global with_python3 1 +%else +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")} +%endif Name: python-%{pypi_name} Version: 0.3.12 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Fixtures, reusable state for writing clean tests and more License: ASL 2.0 or BSD @@ -22,16 +26,47 @@ make it easy to write your own fixtures using the fixtures contract. Glue code is provided that makes using fixtures that meet the Fixtures contract in unittest compatible test cases easy and straight forward. +%if 0%{?with_python3} +%package -n python3-%{pypi_name} +Summary: Fixtures, reusable state for writing clean tests and more +BuildArch: noarch +BuildRequires: python3-devel +BuildRequires: python3-setuptools +Requires: python3-testtools + +%description -n python3-%{pypi_name} +Fixtures defines a Python contract for reusable state / support logic, +primarily for unit testing. Helper and adaption logic is included to +make it easy to write your own fixtures using the fixtures contract. +Glue code is provided that makes using fixtures that meet the Fixtures +contract in unittest compatible test cases easy and straight forward. + +%endif + %prep %setup -q -n %{pypi_name}-%{version} +%if 0%{?with_python3} +cp -a . %{py3dir} +%endif + %build %{__python} setup.py build +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif # with_python3 %install +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install --skip-build --root %{buildroot} +popd +%endif %{__python} setup.py install --skip-build --root %{buildroot} @@ -40,7 +75,17 @@ contract in unittest compatible test cases easy and straight forward. %{python_sitelib}/%{pypi_name} %{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info +%if 0%{?with_python3} +%files -n python3-%{pypi_name} +%doc README GOALS NEWS Apache-2.0 BSD COPYING +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info +%endif + %changelog +* Fri May 31 2013 Matthias Runge - 0.3.12-3 +- enable python3 + * Thu Feb 14 2013 Fedora Release Engineering - 0.3.12-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild