diff --git a/python-waitress.spec b/python-waitress.spec index 8eef10ea172fb48443129684d7d7a0429e4c2f01..cbe2d25a891c9480afa118fe84d959148306c4a1 100644 --- a/python-waitress.spec +++ b/python-waitress.spec @@ -5,7 +5,8 @@ Release: 1 Summary: Waitress WSGI server License: ZPLv2.1 URL: https://github.com/Pylons/waitress -Source: %{url}/archive/v%{version}/waitress-%{version}.tar.gz + +Source0: https://files.pythonhosted.org/packages/bf/cb/04ddb054f45faa306a230769e868c28b8065ea196891f09004ebace5b184/waitress-%{version}.tar.gz BuildArch: noarch Requires: python3-Sphinx @@ -26,7 +27,9 @@ supports HTTP/1.0 and HTTP/1.1. Summary: Waitress WSGI server Provides: python-waitress BuildRequires: python3-devel -BuildRequires: python3-setuptools +BuildRequires: python3-pip +BuildRequires: python3-wheel +BuildRequires: python3-build %description -n python3-waitress Waitress is a production-quality pure-Python WSGI server with very acceptable performance. It has no dependencies except ones which live in the Python @@ -48,27 +51,39 @@ supports HTTP/1.0 and HTTP/1.1. %autosetup -n waitress-%{version} -p1 %build -%py3_build +%pyproject_build %install -%py3_install -install -d -m755 %{buildroot}/%{_pkgdocdir} +export PYTHONDONTWRITEBYTECODE=1 +%pyproject_install + +rm -rf %{buildroot}%{python3_sitelib}/tests || : + +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 + +find %{buildroot} -name '*.py[co]' -delete +find %{buildroot} -type d -name '__pycache__' -print0 | xargs -0 rm -rf || : + +find %{buildroot} -type d -name __pycache__ -print0 | xargs -0 rm -rf 2>/dev/null || true +find %{buildroot} -name "*.pyc" -delete 2>/dev/null || true +find %{buildroot} -name "*.pyo" -delete 2>/dev/null || true + pushd %{buildroot} if [ -d usr/lib ]; then - find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst + find usr/lib -type f ! -path "*/__pycache__/*" ! -name "*.pyc" ! -name "*.pyo" -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then - find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst + find usr/lib64 -type f ! -path "*/__pycache__/*" ! -name "*.pyc" ! -name "*.pyo" -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then - find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst + find usr/bin -type f ! -path "*/__pycache__/*" ! -name "*.pyc" ! -name "*.pyo" -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then - find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst + find usr/sbin -type f ! -path "*/__pycache__/*" ! -name "*.pyc" ! -name "*.pyo" -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then @@ -78,20 +93,33 @@ popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . +rm -rf %{buildroot}%{python3_sitelib}/waitress/__pycache__ 2>/dev/null || true +rm -rf %{buildroot}%{python3_sitelib}/__pycache__ 2>/dev/null || true +find %{buildroot} -type d -name __pycache__ -print0 | xargs -0 rm -rf 2>/dev/null || true +find %{buildroot} -name "*.pyc" -delete 2>/dev/null || true +find %{buildroot} -name "*.pyo" -delete 2>/dev/null || true + %files -n python3-waitress -f filelist.lst %dir %{python3_sitelib}/* +%exclude %{python3_sitelib}/waitress/__pycache__ +%exclude %{python3_sitelib}/waitress/__pycache__/* +%exclude %{python3_sitelib}/__pycache__ +%exclude %{python3_sitelib}/__pycache__/* %files help -f doclist.lst %{_docdir}/* %changelog +* Fri Nov 21 2025 zhao6777 - 3.0.2-1 +- Switch to %%pyproject_build and %%pyproject_install + * Wed Mar 12 2025 Dongxing Wang - 3.0.2-1 - Update package to version 3.0.2 Don't strip value when inserting into WSGI environ Add tests to make sure we don't strip non-RFC7230 whitespace from header Assume socket is not connected when passed to wasyncore.dispatcher Drop Python 3.8 and add Python 3.13 - + * Wed Oct 30 2024 liningjie - 3.0.0-3 - Fix CVE-2024-49769 diff --git a/v3.0.0.tar.gz b/v3.0.0.tar.gz deleted file mode 100644 index df8d24cd28e0941915030f04b6b4127874e34882..0000000000000000000000000000000000000000 Binary files a/v3.0.0.tar.gz and /dev/null differ diff --git a/waitress-3.0.2.tar.gz b/waitress-3.0.2.tar.gz index 2e29ae73db59c012c31bf4e38be80b5aff3fe4b6..65ca59670e63403475f88586923f9fa4c7cd4ab2 100644 Binary files a/waitress-3.0.2.tar.gz and b/waitress-3.0.2.tar.gz differ