diff --git a/python-whitenoise.spec b/python-whitenoise.spec index a0181dab59fd83f521084fc035daa87df942dbc0..d6b4627188356e0e198261548b4f4353493a0b8b 100644 --- a/python-whitenoise.spec +++ b/python-whitenoise.spec @@ -1,20 +1,12 @@ -%global with_docs 1 -%global with_check 1 - -%global srcname whitenoise -%global owner evansd - -Name: python-%{srcname} -Version: 5.3.0 -Release: 1 -Summary: Static file serving for Python web apps - -License: MIT -URL: http://whitenoise.evans.io/ -# pypi source does not contain tests -Source0: https://github.com/%{owner}/%{srcname}/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz - -BuildArch: noarch +%global _empty_manifest_terminate_build 0 +Name: python-whitenoise +Version: 6.5.0 +Release: 1 +Summary: Static file serving for Python web apps +License: MIT +URL: http://whitenoise.evans.io/ +Source0: https://files.pythonhosted.org/packages/75/c9/e5c293759cc3edefaaaadde986968d6d5cfa26284d25148d690fa3e578c8/whitenoise-6.5.0.tar.gz +BuildArch: noarch %description Radically simplified static file serving for python web apps. with a couple of @@ -23,91 +15,84 @@ 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.) - -%package -n python3-%{srcname} -Summary: Static file serving for Python web apps -License: MIT - -# python3-brotli is missing in RHEL at the moment -# See: https://bugzilla.redhat.com/show_bug.cgi?id=1845954 -%if ! 0%{?el8} -BuildRequires: python3-brotli -%endif -BuildRequires: python3-devel -BuildRequires: python3-django -BuildRequires: python3-pytest -BuildRequires: python3-requests -BuildRequires: python3-setuptools -Requires: python3-django -%{?python_provide:%python_provide python3-%{srcname}} - - -%description -n python3-%{srcname} +%package -n python3-whitenoise +Summary: Static file serving for Python web apps +Provides: python-whitenoise = %{version}-%{release} +BuildRequires: python3-brotli +BuildRequires: python3-pip +BuildRequires: python3-devel +BuildRequires: python3-django +BuildRequires: python3-pytest +BuildRequires: python3-requests +BuildRequires: python3-sphinx +BuildRequires: python3-pip +BuildRequires: python3-flit +BuildRequires: python3-wheel +BuildRequires: python3-sphinx_rtd_theme +%description -n python3-whitenoise 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 python3-%{srcname}-doc -Summary: Documentation for the Python Whitenoise module -BuildRequires: python3-sphinx -BuildRequires: python3-sphinx_rtd_theme - -%description -n python3-%{srcname}-doc -Documentation for the Python Whitenoise module -%endif +on nginx, amazon s3 or any other external service. (Especially useful on +Heroku, OpenShift and other PaaS providers.) +%package help +Summary: Development documents and examples for whitenoise +Provides: python3-whitenoise-doc +%description help +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.) %prep -%autosetup -n %{srcname}-%{version} -# remove dangling doc symlink -rm docs/changelog.rst -# copy common doc files to top dir -cp -pr docs/ README.rst LICENSE ../ - +%autosetup -n whitenoise-%{version} %build -%py3_build - -# Build documentation -%if 0%{?with_docs} -pushd docs -sphinx-build-3 -b html -d build/doctrees . html -# remove unneeded files which create rpmlint warnings -rm -f html/.buildinfo -popd -%endif - +%pyproject_build %install -%py3_install - - -%if %{?with_check} -%check -export DJANGO_SETTINGS_MODULE=tests.django_settings -python3 -m unittest discover -%endif - - -%files -n python3-%{srcname} -%doc README.rst -%license LICENSE -%{python3_sitelib}/%{srcname} -%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info - +%pyproject_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +if [ -f README.rst ]; then cp -af README.rst %{buildroot}/%{_pkgdocdir}; fi +if [ -f README.md ]; then cp -af README.md %{buildroot}/%{_pkgdocdir}; fi +if [ -f README.txt ]; then cp -af README.txt %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . -%if 0%{?with_docs} -%files -n python3-%{srcname}-doc -%doc docs/html -%license LICENSE -%endif +%files -n python3-whitenoise +%{python3_sitelib}/* +%files help +%{_docdir}/* %changelog +* Mon Jul 03 2023 chenzixuan - 6.5.0-1 +- Update package to version 6.5.0 + * Wed Apr 12 2023 wubijie - 5.3.0-1 - Update package to version 5.3.0 diff --git a/whitenoise-5.3.0.tar.gz b/whitenoise-5.3.0.tar.gz deleted file mode 100644 index ac36ae7ef4b6646ce10224689d48f2b0de0f5eba..0000000000000000000000000000000000000000 Binary files a/whitenoise-5.3.0.tar.gz and /dev/null differ diff --git a/whitenoise-6.5.0.tar.gz b/whitenoise-6.5.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..0108829403147e12735ad3b7b1d8337e6b6d68e6 Binary files /dev/null and b/whitenoise-6.5.0.tar.gz differ