From 52c2bc1636008453e7ad07d7161d3f240778efb0 Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Jan 17 2018 00:25:35 +0000 Subject: Removed Python 2 subpackage See https://fedoraproject.org/wiki/Changes/Django20 --- diff --git a/python-django-appconf.spec b/python-django-appconf.spec index b449a0e..d78d789 100644 --- a/python-django-appconf.spec +++ b/python-django-appconf.spec @@ -1,22 +1,9 @@ -%{!?__python2:%global __python2 %{__python}} -%{!?python2_sitelib: %global python2_sitelib %{python_sitelib}} -%{!?python2_sitearch: %global python2_sitearch %{python_sitearch}} -%{!?python2_version: %global python2_version %{python_version}} - %global pypi_name django-appconf - -%if 0%{?fedora} > 12 -%global with_python3 1 -%else -%global with_python3 0 -%endif - - %global with_tests 0 Name: python-%{pypi_name} Version: 1.0.2 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A helper class for handling configuration defaults of packaged apps gracefully License: BSD @@ -24,14 +11,6 @@ URL: http://pypi.python.org/pypi/django-appconf/ Source0: https://github.com/django-compressor/%{pypi_name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildArch: noarch -BuildRequires: python2-devel -BuildRequires: python2-sphinx -BuildRequires: python2-setuptools - -BuildRequires: python-django-discover-runner -BuildRequires: python2-flake8 -BuildRequires: python-coverage -BuildRequires: python2-django %global _description\ A helper class for handling configuration\ @@ -40,76 +19,63 @@ apps gracefully. %description %_description -%package -n python2-%{pypi_name} -Summary: %summary -Requires: python2-django -%{?python_provide:%python_provide python2-%{pypi_name}} - -%description -n python2-%{pypi_name} %_description -%if 0%{?with_python3} %package -n python3-%{pypi_name} Summary: A helper class for handling configuration defaults of packaged apps gracefully +BuildRequires: python3-coverage BuildRequires: python3-devel -BuildRequires: python-sphinx +BuildRequires: python3-django BuildRequires: python3-setuptools +BuildRequires: python3-sphinx Requires: python3-django -%description -n python3-%{pypi_name} -A helper class for handling configuration -defaults of packaged Django -apps gracefully. +Obsoletes: python2-%{pypi_name} < 1.0.2-6 +Obsoletes: python-%{pypi_name} < 1.0.2-6 + +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} %_description -%endif %prep %autosetup -n %{pypi_name}-%{version} # generate html docs -sphinx-build docs html +sphinx-build-3 docs html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %build -%py2_build - -%if 0%{?with_python3} %py3_build -%endif %install -%py2_install - -%if 0%{?with_python3} %py3_install -%endif + # checks fail in mock %check -%{__python} setup.py test export PYTHONPATH=.:$PYTHONPATH export DJANGO_SETTINGS_MODULE=tests.test_settings -coverage run %{_bindir}/django-admin test -v2 test +%{__python3} setup.py test +coverage3 run %{_bindir}/python3-django-admin test -v2 test +# ^ change to django-admin once that is Python 3 -%files -n python2-%{pypi_name} -%doc html README.rst -%license LICENSE -%{python2_sitelib}/appconf -%{python2_sitelib}/django_appconf-%{version}-py%{python2_version}.egg-info -%if 0%{?with_python3} %files -n python3-%{pypi_name} %doc html README.rst %license LICENSE %{python3_sitelib}/appconf %{python3_sitelib}/django_appconf-%{version}-py%{python3_version}.egg-info -%endif + %changelog +* Tue Jan 16 2018 Miro Hrončok - 1.0.2-6 +- Removed Python 2 subpackage for https://fedoraproject.org/wiki/Changes/Django20 + * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 1.0.2-5 - Python 2 binary package renamed to python2-django-appconf See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3