#1 Removed Python 2 subpackage
Merged 6 years ago by churchyard. Opened 6 years ago by churchyard.
rpms/ churchyard/python-django-babel nopy2  into  master

file modified
+15 -60
@@ -1,13 +1,9 @@ 

  %global pypi_name django-babel

  

- %if 0%{?fedora} || 0%{?rhel} > 7

- %global with_python3 1

- %endif

- 

  Name:           python-%{pypi_name}

  

  Version:        0.6.2

- Release:        3%{?dist}

+ Release:        4%{?dist}

  Summary:        Utilities for using Babel in Django

  

  License:        BSD
@@ -25,44 +21,13 @@ 

  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:  python2-setuptools

- BuildRequires:  python2-sphinx

- 

- # test requirements

- #BuildRequires:  python-coverage

- #BuildRequires:  pytest

- #BuildRequires:  python-pytest-cov

- #BuildRequires:  python-pytest-flakes

- # currently missing dep:

- # BuildRequires: python-coveralls

- 

- Requires:       python2-django1.11

- Requires:       python2-django1.11

- Requires:       python2-babel >= 1.3

- Requires:       python2-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-django

  BuildRequires:  python3-setuptools

  BuildRequires:  python3-sphinx

  
@@ -78,6 +43,9 @@ 

  Requires:       python3-babel >= 1.3

  Requires:       python3-setuptools

  

+ Obsoletes:      python-django-babel < 0.6.2-3

+ Obsoletes:      python2-django-babel < 0.6.2-3

+ 

  %description -n python3-django-babel

  This package contains various utilities for integration of

  Babel into the Django web framework:
@@ -86,7 +54,6 @@ 

  * 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}
@@ -94,15 +61,11 @@ 

  

  

  %build

- %{__python2} setup.py build

- 

- %if 0%{?with_python3}

- %{__python3} setup.py build

- %endif

+ %py3_build

  

  # generate html docs

  export PYTHONPATH=.:$PYTHONPATH

- sphinx-build docs html

+ sphinx-build-3 docs html

  # remove the sphinx-build leftovers

  rm -rf html/.{doctrees,buildinfo}

  
@@ -110,32 +73,24 @@ 

  

  

  %install

- %{__python2} setup.py install --skip-build --root %{buildroot}

- 

- %if 0%{?with_python3}

- %{__python3} setup.py install --skip-build --root %{buildroot}

- %endif

+ %py3_install

  

  %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/

  %{python3_sitelib}/django_babel-%{version}-py?.?.egg-info

- %endif

  

  %changelog

+ * Mon Feb 12 2018 Miro Hrončok <mhroncok@redhat.com> - 0.6.2-4

+ - Removed Python 2 subpackage for https://fedoraproject.org/wiki/Changes/Django20

+ - Run Python 3 version of Sphinx

+ - Use %%py3_... macros for build and install

+ - Make sure %%{python3_sitelib}/django_babel/ is a directory

+ 

  * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-3

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

  

See https://fedoraproject.org/wiki/Changes/Django20

Also:

  • Run Python 3 version of Sphinx
  • Use %py3_... macros for build and install
  • Make sure %{python3_sitelib}/django_babel/ is a directory

rebased onto ee2d239

6 years ago

Pull-Request has been merged by churchyard

6 years ago