%global pypi_name django-pytest
%global with_python3 1
Name: python-%{pypi_name}
Version: 0.2.0
Release: 11%{?dist}
Summary: Allows you to use py.test as a django test runner
License: BSD
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: python2-devel
BuildRequires: python-setuptools
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%endif
Requires: python-django
Requires: pytest
Provides: %{pypi_name} = %{version}-%{release}
%description
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
%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
%doc LICENSE.txt README.md
%{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.?.egg-info
%changelog
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-11
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-9
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.2.0-6
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Mar 27 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 0.2.0-4
- Rebuilt with Django 1.5.
- Introduced python3 subpackage.
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Wed Mar 28 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.2.0-1
- Update to version 0.2.0
- Be more verbose in %%files section
* Wed Mar 28 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.1.5-1
- Initial package