f7bade0
%global with_docs 1
f7bade0
%global with_check 1
47b5450
%global with_django 1
1cc30e9
1cc30e9
%global srcname whitenoise
1cc30e9
%global owner evansd
1cc30e9
47b5450
%if 0%{?rhel} == 9
47b5450
%undefine with_check
47b5450
%undefine with_django
47b5450
%endif
47b5450
1cc30e9
Name:           python-%{srcname}
af74a1c
Version:        6.4.0
af74a1c
Release:        1%{?dist}
1cc30e9
Summary:        Static file serving for Python web apps
1cc30e9
1cc30e9
License:        MIT
1cc30e9
URL:            http://whitenoise.evans.io/
1cc30e9
# pypi source does not contain tests
4ee3cf4
Source0:        https://github.com/evansd/whitenoise/archive/refs/tags/%{version}.tar.gz
af74a1c
Patch:          whitenoise-6.4.0-default-docs-theme.patch
1cc30e9
1cc30e9
BuildArch:      noarch
1cc30e9
1cc30e9
%description
1cc30e9
Radically simplified static file serving for python web apps. with a couple of
1cc30e9
lines of config whitenoise allows your web app to serve its own static files,
1cc30e9
making it a self-contained unit that can be deployed anywhere without relying
1cc30e9
on nginx, amazon s3 or any other external service. (Especially useful on
1cc30e9
Heroku, OpenShift and other PaaS providers.)
1cc30e9
1cc30e9
1cc30e9
%package -n python3-%{srcname}
1cc30e9
Summary:        Static file serving for Python web apps
1cc30e9
License:        MIT
1cc30e9
1cc30e9
BuildRequires:  python3-devel
af74a1c
BuildRequires:  python3-brotli
47b5450
%if 0%{?with_django}
1cc30e9
BuildRequires:  python3-django
47b5450
%endif
1cc30e9
af74a1c
#for tests
af74a1c
BuildRequires:  python3-pytest
442e2b2
1cc30e9
%description -n python3-%{srcname}
1cc30e9
Radically simplified static file serving for python web apps. with a couple of
1cc30e9
lines of config whitenoise allows your web app to serve its own static files,
1cc30e9
making it a self-contained unit that can be deployed anywhere without relying
1cc30e9
on nginx, amazon s3 or any other external service. (especially useful on
1cc30e9
heroku, openshift and other paas providers.)
1cc30e9
1cc30e9
f7bade0
%if 0%{?with_docs}
1cc30e9
%package -n python3-%{srcname}-doc
1cc30e9
Summary:        Documentation for the Python Whitenoise module
1cc30e9
BuildRequires:  python3-sphinx
1cc30e9
BuildRequires:  python3-sphinx_rtd_theme
1cc30e9
1cc30e9
%description -n python3-%{srcname}-doc
1cc30e9
Documentation for the Python Whitenoise module
dda0a4c
%endif
1cc30e9
1cc30e9
1cc30e9
%prep
4ee3cf4
%autosetup -n %{srcname}-%{version} -p1
1cc30e9
# remove dangling doc symlink
1cc30e9
rm docs/changelog.rst
1cc30e9
# copy common doc files to top dir
1cc30e9
cp -pr docs/ README.rst LICENSE ../
1cc30e9
af74a1c
%generate_buildrequires
af74a1c
%pyproject_buildrequires
af74a1c
1cc30e9
1cc30e9
%build
af74a1c
%pyproject_wheel
f7bade0
1cc30e9
# Build documentation
f7bade0
%if 0%{?with_docs}
1cc30e9
pushd docs
fdfdf0e
sphinx-build-3 -b html -d build/doctrees . html
1cc30e9
# remove unneeded files which create rpmlint warnings
fdfdf0e
rm -f html/.buildinfo
1cc30e9
popd
dda0a4c
%endif
1cc30e9
1cc30e9
1cc30e9
%install
af74a1c
%pyproject_install
af74a1c
af74a1c
%pyproject_save_files whitenoise
1cc30e9
1cc30e9
47b5450
%if 0%{?with_check}
1cc30e9
%check
1cc30e9
export DJANGO_SETTINGS_MODULE=tests.django_settings
4ee3cf4
%pytest
dda0a4c
%endif
1cc30e9
1cc30e9
af74a1c
%files -n python3-%{srcname} -f %{pyproject_files}
fdfdf0e
%doc README.rst
1cc30e9
%license LICENSE
1cc30e9
1cc30e9
f7bade0
%if 0%{?with_docs}
1cc30e9
%files -n python3-%{srcname}-doc
fdfdf0e
%doc docs/html
1cc30e9
%license LICENSE
dda0a4c
%endif
1cc30e9
1cc30e9
1cc30e9
%changelog
af74a1c
* Thu Apr 13 2023 Jonathan Wright <jonathan@almalinux.org> - 6.4.0-1
af74a1c
- update to 6.4.0 rhbz#2093782
af74a1c
- modernize spec
af74a1c
47b5450
* Thu Mar 02 2023 Jonathan Wright <jonathan@almalinux.org > - 6.1.0-5
47b5450
- Skip tests on EL9 due to missing python3-django package
47b5450
- Remove unnecessary python3-brotli exclusion for el8
47b5450
d0b0859
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.0-4
d0b0859
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
d0b0859
39959be
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.0-3
39959be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
39959be
49a31f1
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 6.1.0-2
49a31f1
- Rebuilt for Python 3.11
49a31f1
4ee3cf4
* Mon May 30 2022 Kevin Fenzi <kevin@scrye.com> - 6.1.0-1
4ee3cf4
- Update to 6.1.0. Fixes rhbz#2052810
4ee3cf4
c00ff15
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.0-2
c00ff15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
c00ff15
5ae5b82
* Sun Aug 08 2021 Kevin Fenzi <kevin@scrye.com> - 5.3.0-1
5ae5b82
- Update to 5.3.0. Fixes rhbz#1983269
5ae5b82
9995318
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.0-3
9995318
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
9995318
87e7a5f
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 5.2.0-2
87e7a5f
- Rebuilt for Python 3.10
87e7a5f
fa63f00
* Sat May 22 2021 Kevin Fenzi <kevin@scrye.com> - 5.2.0-1
fa63f00
- Update to 5.2.0. Fixes rhbz#1866031
fa63f00
d75bdc2
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-3
d75bdc2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
d75bdc2
c1e0e8e
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-2
c1e0e8e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
c1e0e8e
4f92292
* Thu Jun 11 2020 Neal Gompa <ngompa13@gmail.com> - 5.1.0-1
4f92292
- Update to 5.1.0
4f92292
76e4b25
* Wed Jun 10 2020 Neal Gompa <ngompa13@gmail.com> - 5.0.1-4
76e4b25
- Drop BR on python3-brotli for EL8 as it is not available
76e4b25
9ad059d
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 5.0.1-3
9ad059d
- Rebuilt for Python 3.9
9ad059d
e878d6a
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.1-2
e878d6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
e878d6a
dda0a4c
* Tue Jan 21 2020 Piotr Popieluch <piotr1212@gmail.com> - 5.0.1-1
dda0a4c
- Update to 5.0.1
dda0a4c
23dd3dc
* Tue Sep 24 2019 David Moreau-Simard <dmsimard@redhat.com> - 4.1.4-1
23dd3dc
- Update to latest upstream release
23dd3dc
74f35b8
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 4.1-5
74f35b8
- Rebuilt for Python 3.8
74f35b8
bb7023e
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-4
bb7023e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
bb7023e
3ac0543
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-3
3ac0543
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
3ac0543
b03330a
* Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.1-2
b03330a
- Drop explicit locale setting
b03330a
  See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot
b03330a
fdfdf0e
* Tue Oct 02 2018 Piotr Popieluch <piotr1212@gmail.com> - 4.1-1
fdfdf0e
- Update to 4.1
fdfdf0e
- Remove Python 2 subpackage
fdfdf0e
a277e90
* Sun Jul 29 2018 Piotr Popieluch <piotr1212@gmail.com> - 3.3.1-4
a277e90
- Update python_sitelib to python2_sitelib macro
a277e90
67a0c00
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-3
67a0c00
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
67a0c00
3ee4eb3
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.3.1-2
3ee4eb3
- Rebuilt for Python 3.7
3ee4eb3
469a70f
* Mon Mar 19 2018 Piotr Popieluch <piotr1212@gmail.com> - 3.3.1-2
469a70f
- Update to 3.3.1
469a70f
- Disable checks on python3 until we have support for Django2
469a70f
c40e64f
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-6
c40e64f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
c40e64f
f53f2c0
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-5
f53f2c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f53f2c0
1be8e46
* Fri Jun 30 2017 Piotr Popieluch <piotr1212@gmail.com> - 3.1-4
1be8e46
- Upate requires to include Python version
1be8e46
cc23ffc
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-3
cc23ffc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
cc23ffc
6e97336
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 3.1-2
6e97336
- Rebuild for Python 3.6
6e97336
959cf15
* Sun Sep 25 2016 Piotr Popieluch <piotr1212@gmail.com> - - 3.1-1
959cf15
- Update to 3.1
442e2b2
f7bade0
* Sun Sep 25 2016 Piotr Popieluch <piotr1212@gmail.com> - 2.0.6-5
f7bade0
- Update to newer package guidelines
f7bade0
- EL6 support
f7bade0
438b880
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.6-4
438b880
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
438b880
6e55eb7
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-3
6e55eb7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
6e55eb7
1cc30e9
* Sun Nov 29 2015 Piotr Popieluch <piotr1212@gmail.com> - 2.0.6-2
1cc30e9
- Add license to all subpackages
1cc30e9
- Create a python2 subpackage
1cc30e9
1cc30e9
* Fri Nov 27 2015 Piotr Popieluch <piotr1212@gmail.com> - 2.0.6-1
1cc30e9
- Update to new version
1cc30e9
- Add missing BR
1cc30e9
- Change source from pypi to github
1cc30e9
- Use py.test
1cc30e9
- Add doc subpackage
1cc30e9
1cc30e9
* Tue Nov 10 2015 Piotr Popieluch <piotr1212@gmail.com> - 2.0.4-3
1cc30e9
- Rewrite spec to support EL6 & EL7
1cc30e9
1cc30e9
* Thu Nov 05 2015 Piotr Popieluch <piotr1212@gmail.com> - 2.0.4-2
1cc30e9
- Remove shebang from gzip.py script
1cc30e9
1cc30e9
* Thu Oct 22 2015 Piotr Popieluch <piotr1212@gmail.com> - 2.0.4-1
1cc30e9
- Initial package