diff --git a/python-crypto-2.6.1-python3.11.patch b/python-crypto-2.6.1-python3.11.patch new file mode 100644 index 0000000..c52b1f7 --- /dev/null +++ b/python-crypto-2.6.1-python3.11.patch @@ -0,0 +1,10 @@ +--- src/_fastmath.c ++++ src/_fastmath.c +@@ -30,7 +30,6 @@ + #include + #include "Python.h" + #include "pycrypto_compat.h" +-#include /* for conversions */ + #include "config.h" + #if HAVE_LIBGMP + # include diff --git a/python-crypto.spec b/python-crypto.spec index 4d8b0a6..eeea671 100644 --- a/python-crypto.spec +++ b/python-crypto.spec @@ -7,7 +7,7 @@ Summary: Cryptography library for Python Name: python-crypto Version: 2.6.1 -Release: 36%{?dist} +Release: 37%{?dist} # Mostly Public Domain apart from parts of HMAC.py and setup.py, which are Python License: Public Domain and Python URL: http://www.pycrypto.org/ @@ -21,6 +21,7 @@ Patch5: pycrypto-2.6.1-CVE-2018-6594.patch Patch6: pycrypto-2.6.1-use-os-random.patch Patch7: pycrypto-2.6.1-drop-py2.1-support.patch Patch8: python-crypto-2.6.1-python3.10.patch +Patch9: python-crypto-2.6.1-python3.11.patch BuildRequires: coreutils BuildRequires: findutils BuildRequires: gcc @@ -89,6 +90,10 @@ rm -rf src/libtom # https://bugzilla.redhat.com/show_bug.cgi?id=1897544 %patch8 +# Fix Python 3.11 compatibility +# https://bugzilla.redhat.com/show_bug.cgi?id=2021808 +%patch9 + # setup.py doesn't run 2to3 on pct-speedtest.py cp pct-speedtest.py pct-speedtest3.py 2to3 -wn pct-speedtest3.py @@ -116,6 +121,9 @@ PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} pct-speedtest3.py %{python3_sitearch}/pycrypto-%{version}-py3.*.egg-info %changelog +* Wed Nov 10 2021 Paul Howarth - 2.6.1-37 +- Fix Python 3.11 compatibility (#2021808) + * Fri Jul 23 2021 Fedora Release Engineering - 2.6.1-36 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild