diff --git a/uwsgi.spec b/uwsgi.spec index 015fd25..3db1e53 100644 --- a/uwsgi.spec +++ b/uwsgi.spec @@ -135,7 +135,7 @@ Name: uwsgi Version: 2.0.20 -Release: 2.1%{?dist} +Release: 3%{?dist} Summary: Fast, self-healing, application container server # uwsgi is licensed under GPLv2 with a linking exception # docs are licensed under MIT @@ -163,6 +163,7 @@ Patch12: uwsgi_fix_php8.patch Patch13: uwsgi_fix_chroot_chdir.patch # https://github.com/unbit/uwsgi/issues/2356 Patch14: uwsgi_fix_php_arginfo.patch +Patch15: uwsgi_fix_python_py_ssize_t.patch BuildRequires: curl, libxml2-devel, libuuid-devel, jansson-devel BuildRequires: libyaml-devel, ruby-devel @@ -1170,6 +1171,7 @@ cp -p %{SOURCE5} README.Fedora %patch12 -p1 %patch13 -p1 %patch14 -p1 +%patch15 -p1 %if %{with perl} && (%{with python3} || %{with python3_other}) %{__python} -m lib2to3 --write --nobackups plugins/coroae/uwsgiplugin.py @@ -1773,6 +1775,9 @@ exit 0 %changelog +* Sat Feb 19 2022 Ralf Ertzinger - 2.0.20-3 +- Fix errors in uwsgi python module when building against python3.10 or higher + * Wed Feb 16 2022 Ralf Ertzinger - 2.0.20-2.1 - F37 rebuild for new libgo diff --git a/uwsgi_fix_python_py_ssize_t.patch b/uwsgi_fix_python_py_ssize_t.patch new file mode 100644 index 0000000..ec90175 --- /dev/null +++ b/uwsgi_fix_python_py_ssize_t.patch @@ -0,0 +1,11 @@ +diff -uNr a/plugins/python/uwsgi_python.h b/plugins/python/uwsgi_python.h +--- a/plugins/python/uwsgi_python.h 2021-10-06 07:22:45.000000000 +0200 ++++ b/plugins/python/uwsgi_python.h 2022-02-19 18:39:10.929895062 +0100 +@@ -1,3 +1,7 @@ ++// This needs to be defined before Python.h is included ++// to indicate that the code uses Py_ssize_t properly ++#define PY_SSIZE_T_CLEAN ++ + #include + #include +