From fdfdf0ee12e7a8233d53fee058c0de89f2301523 Mon Sep 17 00:00:00 2001 From: Piotr Date: Oct 02 2018 14:50:24 +0000 Subject: Update to 4.1 Remove Python 2 subpackage --- diff --git a/.gitignore b/.gitignore index 7a21598..5c7ccdf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /whitenoise-9fafc38.tar.gz /whitenoise-a1bb363.tar.gz /whitenoise-9238341.tar.gz +/whitenoise-8883095.tar.gz diff --git a/python-whitenoise.spec b/python-whitenoise.spec index 31a78ec..feb4aae 100644 --- a/python-whitenoise.spec +++ b/python-whitenoise.spec @@ -1,29 +1,14 @@ -# docs don't build on el6 -# check fails on el6 but seems to work -%if 0%{?rhel} == 6 -%global with_docs 0 -%global with_check 0 -%else %global with_docs 1 %global with_check 1 -%endif - -# Python 3 check fails on Django2, disable until we update tot whitenoise 4 -%global with_python3_check 0 - -# Python3 is currently only available on Fedora -%if 0%{?fedora} -%global with_python3 1 -%endif %global srcname whitenoise -%global commit0 9238341a348c57e20a0f4bab34fb93b86c7d59be +%global commit0 8883095d68e6f9792e1dac97f63225b859b775c8 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global owner evansd Name: python-%{srcname} -Version: 3.3.1 -Release: 4%{?dist} +Version: 4.1 +Release: 1%{?dist} Summary: Static file serving for Python web apps License: MIT @@ -41,54 +26,11 @@ on nginx, amazon s3 or any other external service. (Especially useful on Heroku, OpenShift and other PaaS providers.) -%package -n python2-%{srcname} -Summary: Static file serving for Python web apps -License: MIT - -BuildRequires: python2-devel -BuildRequires: python2-requests -BuildRequires: python2-setuptools -BuildRequires: python2-pytest -%if 0%{?rhel} == 6 -BuildRequires: Django -BuildRequires: python-unittest2 -BuildRequires: python-argparse -Requires: Django -%else -%if 0%{?fedora} < 28 -BuildRequires: python2-django -Requires: python2-django -%else -BuildRequires: python2-django1.11 -Requires: python2-django1.11 -%endif -%endif -%{?python_provide:%python_provide python2-%{srcname}} - -%description -n python2-%{srcname} -Radically simplified static file serving for python web apps. with a couple of -lines of config whitenoise allows your web app to serve its own static files, -making it a self-contained unit that can be deployed anywhere without relying -on nginx, amazon s3 or any other external service. (Especially useful on -Heroku, OpenShift and other PaaS providers.) - -%if 0%{?with_docs} -%package -n python2-%{srcname}-doc -Summary: Documentation for the Python Whitenoise module -BuildRequires: python2-sphinx -BuildRequires: python2-sphinx_rtd_theme - - -%description -n python2-%{srcname}-doc -Documentation for the Python Whitenoise module -%endif # with_docs - - -%if 0%{?with_python3} %package -n python3-%{srcname} Summary: Static file serving for Python web apps License: MIT +BuildRequires: python3-brotli BuildRequires: python3-devel BuildRequires: python3-django BuildRequires: python3-pytest @@ -111,13 +53,10 @@ heroku, openshift and other paas providers.) Summary: Documentation for the Python Whitenoise module BuildRequires: python3-sphinx BuildRequires: python3-sphinx_rtd_theme -# Can be removed after RHBZ#1282297 is pushed -BuildRequires: fontawesome-fonts-web %description -n python3-%{srcname}-doc Documentation for the Python Whitenoise module %endif # with_docs -%endif # with_python3 %prep @@ -126,74 +65,35 @@ Documentation for the Python Whitenoise module rm docs/changelog.rst # copy common doc files to top dir cp -pr docs/ README.rst LICENSE ../ -sed -i "1iSTATIC_ROOT='.'" -i tests/django_settings.py %build -%py2_build - -# Build documentation -%if 0%{?with_docs} -pushd docs -sphinx-build -b html -d build/doctrees . python2/build/html -# remove unneeded files which create rpmlint warnings -rm -f build/html/.buildinfo -rm -f build/html/objects.inv -popd -%endif # with_docs - -%if 0%{?with_python3} %py3_build # Build documentation %if 0%{?with_docs} pushd docs -sphinx-build-3 -b html -d build/doctrees . python3/build/html +sphinx-build-3 -b html -d build/doctrees . html # remove unneeded files which create rpmlint warnings -rm -f build/html/.buildinfo -rm -f build/html/objects.inv +rm -f html/.buildinfo popd %endif # with_docs -%endif # with_python3 %install -%if 0%{?with_python3} %py3_install -%endif # with_python3 - -%py2_install %if %{?with_check} %check export DJANGO_SETTINGS_MODULE=tests.django_settings export LANG=en_US.UTF-8 -python2 setup.py test - -%if 0%{?with_python3_check} -python3 setup.py test -%endif # with_python3 +python3 -m unittest discover %endif # with_check -%files -n python2-%{srcname} -%doc README.rst docs/ -%license LICENSE -%{python2_sitelib}/%{srcname} -%{python2_sitelib}/%{srcname}-%{version}-py2.?.egg-info - - -%if 0%{?with_docs} -%files -n python2-%{srcname}-doc -%doc docs/python2/build/html -%license LICENSE -%endif # with_docs - - -%if 0%{?with_python3} %files -n python3-%{srcname} -%doc README.rst docs/ +%doc README.rst %license LICENSE %{python3_sitelib}/%{srcname} %{python3_sitelib}/%{srcname}-%{version}-py3.?.egg-info @@ -201,13 +101,16 @@ python3 setup.py test %if 0%{?with_docs} %files -n python3-%{srcname}-doc -%doc docs/python3/build/html +%doc docs/html %license LICENSE %endif # with_docs -%endif # with_python3 %changelog +* Tue Oct 02 2018 Piotr Popieluch - 4.1-1 +- Update to 4.1 +- Remove Python 2 subpackage + * Sun Jul 29 2018 Piotr Popieluch - 3.3.1-4 - Update python_sitelib to python2_sitelib macro diff --git a/sources b/sources index 44f0f61..169891c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (whitenoise-9238341.tar.gz) = a6531e0f02473e0743e25115a173a18bff80c95b9df410c555f7e95a4f28e527b0a7a4d58883a38eb893b55ae786b2bc9e4ac602762f389b39e351207c656031 +SHA512 (whitenoise-8883095.tar.gz) = 25583c74856bb6f30cab111891e65906d0633f3e00a9dff7e6ae27ad895d175ee4bf9b4eac0921b499be47f0ffb8fd38253fe6ba15bfe18225fbce5c655f4f81