%global pypi_name django-babel %if 0%{?fedora} %global with_python3 1 %endif Name: python-%{pypi_name} Version: 0.4.0 Release: 2%{?dist} Summary: Utilities for using Babel in Django License: BSD URL: http://github.com/graingert/django-babel/ Source0: https://pypi.python.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch %description This package contains various utilities for integration of Babel into the Django web framework: * A message extraction plugin for Django templates. * A middleware class that adds the Babel `Locale`_ object to requests. * A set of template tags for date and number formatting. %package -n python2-%{pypi_name} Summary: Utilities for using Babel in Django %{?python_provide:%python_provide python2-%{pypi_name}} BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python-sphinx # test requirements #BuildRequires: python-coverage #BuildRequires: pytest #BuildRequires: python-pytest-cov #BuildRequires: python-pytest-flakes # currently missing dep: # BuildRequires: python-coveralls Requires: python-django >= 1.4 Requires: python-django < 1.9 Requires: python-babel >= 1.3 Requires: python-setuptools %description -n python2-django-babel This package contains various utilities for integration of Babel into the Django web framework: * A message extraction plugin for Django templates. * A middleware class that adds the Babel `Locale`_ object to requests. * A set of template tags for date and number formatting. %if 0%{?with_python3} %package -n python3-django-babel Summary: Utilities for using Babel in Django %{?python_provide:%python_provide python3-%{pypi_name}} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-sphinx # test requirements # BuildRequires: python3-coverage # BuildRequires: python3-pytest # BuildRequires: python3-pytest-cov # BuildRequires: python3-pytest-flakes # currently missing test dep: # BuildRequires: python3-coveralls Requires: python3-django Requires: python3-babel >= 1.3 Requires: python3-setuptools %description -n python3-django-babel This package contains various utilities for integration of Babel into the Django web framework: * A message extraction plugin for Django templates. * A middleware class that adds the Babel `Locale`_ object to requests. * A set of template tags for date and number formatting. %endif %prep %setup -q -n %{pypi_name}-%{version} %build %{__python2} setup.py build %if 0%{?with_python3} %{__python2} setup.py build %endif # generate html docs sphinx-build docs html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %install %{__python2} setup.py install --skip-build --root %{buildroot} %if 0%{?with_python3} %{__python3} setup.py install --skip-build --root %{buildroot} %endif %check # python-coveralls is missing test requirement #%{__python2} setup.py test #%if 0%{?with_python3} #%{__python3} setup.py test #%endif %files -n python2-django-babel %doc html README.rst %{python2_sitelib}/django_babel %{python2_sitelib}/django_babel-%{version}-py?.?.egg-info %if 0%{?with_python3} %files -n python3-django-babel %doc README.rst %{python3_sitelib}/django_babel %{python3_sitelib}/django_babel-%{version}-py?.?.egg-info %endif %changelog * Thu Sep 10 2015 Matthias Runge - 0.4.0-2 - spec fixes, move docs creation to build (rhbz#1261042) * Tue Sep 08 2015 Matthias Runge - 0.4.0-1 - Initial package.