diff --git a/python-django-pytest.spec b/python-django-pytest.spec index baf500e..27ab237 100644 --- a/python-django-pytest.spec +++ b/python-django-pytest.spec @@ -1,8 +1,9 @@ %global pypi_name django-pytest +%global with_python3 1 Name: python-%{pypi_name} Version: 0.2.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Allows you to use py.test as a django test runner License: BSD @@ -10,9 +11,14 @@ URL: https://github.com/buchuki/django-pytest Source0: http://pypi.python.org/packages/source/d/django-pytest/%{pypi_name}-%{version}.tar.gz BuildArch: noarch -BuildRequires: python-devel +BuildRequires: python2-devel BuildRequires: python-setuptools +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%endif + Requires: python-django Requires: pytest @@ -22,18 +28,48 @@ Provides: %{pypi_name} = %{version}-%{release} This project allows you to use py.test as a django test runner, instead of the default test runner. +%if 0%{?with_python3} +%package -n python3-%{pypi_name} +Summary: Allows you to use py.test as a django test runner + +Requires: python3-django +Requires: python3-pytest + +%description -n python3-%{pypi_name} +Django is a high-level Python Web framework that encourages rapid +development and a clean, pragmatic design. It focuses on automating as +much as possible and adhering to the DRY (Don't Repeat Yourself) +principle. +%endif + %prep %setup -q -n %{pypi_name}-%{version} # remove the bundled egg-info rm -rf %{pypi_name}.egg-info +%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 -%{__python} setup.py install -O1 --skip-build --root %{buildroot} +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install --skip-build --root %{buildroot} +popd +%endif # with_python3 + +%{__python} setup.py install --skip-build --root %{buildroot} %files @@ -41,7 +77,16 @@ rm -rf %{pypi_name}.egg-info %{python_sitelib}/django_pytest/ %{python_sitelib}/django_pytest-%{version}-py2.7.egg-info +%files -n python3-%{pypi_name} +%doc LICENSE.txt README.md +%{python3_sitelib}/django_pytest/ +%{python3_sitelib}/django_pytest-%{version}-py3.3.egg-info + %changelog +* Wed Mar 27 2013 Bohuslav Kabrda - 0.2.0-4 +- Rebuilt with Django 1.5. +- Introduced python3 subpackage. + * Thu Feb 14 2013 Fedora Release Engineering - 0.2.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild