diff --git a/python-waitress.spec b/python-waitress.spec index 8eef10ea172fb48443129684d7d7a0429e4c2f01..3c44b5acd59f22ad96ed659d14c57de21bcbe9eb 100644 --- a/python-waitress.spec +++ b/python-waitress.spec @@ -1,11 +1,12 @@ %global _empty_manifest_terminate_build 0 Name: python-waitress Version: 3.0.2 -Release: 1 +Release: 2 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,10 +51,10 @@ supports HTTP/1.0 and HTTP/1.1. %autosetup -n waitress-%{version} -p1 %build -%py3_build +%pyproject_build %install -%py3_install +%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 @@ -59,22 +62,26 @@ if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi 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 find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd +# Remove __pycache__ directories and .pyc/.pyo files to ensure they are not packaged +find %{buildroot} -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true +find %{buildroot} -type f -name "*.pyc" -delete +find %{buildroot} -type f -name "*.pyo" -delete mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . @@ -85,12 +92,9 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog -* 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 +* Fri Nov 14 2025 zhao6777 - 3.0.2-2 +- Switch to %pyproject_build and %pyproject_install +- Remove __pycache__ directories and .pyc/.pyo files * 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