Fix Python 3.11 compatibility (#2021808)

f38
Paul Howarth 3 years ago
parent b56d69a58f
commit 56ccdc2d5f

@ -0,0 +1,10 @@
--- src/_fastmath.c
+++ src/_fastmath.c
@@ -30,7 +30,6 @@
#include <string.h>
#include "Python.h"
#include "pycrypto_compat.h"
-#include <longintrepr.h> /* for conversions */
#include "config.h"
#if HAVE_LIBGMP
# include <gmp.h>

@ -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 <paul@city-fan.org> - 2.6.1-37
- Fix Python 3.11 compatibility (#2021808)
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

Loading…
Cancel
Save