diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..b4163ca4cf9cc20311a5698d6696e7a27e9913a4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 David Evans + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/python-whitenoise.spec b/python-whitenoise.spec new file mode 100644 index 0000000000000000000000000000000000000000..bbdcb2292e1a1f16e9b9dac0eb34a298c40ebf00 --- /dev/null +++ b/python-whitenoise.spec @@ -0,0 +1,112 @@ +%global with_docs 1 +%global with_check 1 + +%global srcname whitenoise +%global owner evansd + +Name: python-%{srcname} +Version: 5.2.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}/%{srcname}-%{version}.tar.gz + +BuildArch: noarch + +%description +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.) + + +%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} +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 + + +%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 ../ + + +%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 + + +%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 + + +%if 0%{?with_docs} +%files -n python3-%{srcname}-doc +%doc docs/html +%license LICENSE +%endif + + +%changelog +* Fri Jun 25 2021 anyunhao - 5.2.0-1 +- package init diff --git a/whitenoise-5.2.0.tar.gz b/whitenoise-5.2.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..ebf6388eb00af099dccc2eba0f0e753bece2e01b Binary files /dev/null and b/whitenoise-5.2.0.tar.gz differ