[packages/python-Crypto] - rel 11; fixed build with python 3.8

arekm arekm at pld-linux.org
Tue Oct 29 16:01:51 CET 2019


commit 1710ef62f4c2b989aacfbe32ae35534927b487bf
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Oct 29 16:01:44 2019 +0100

    - rel 11; fixed build with python 3.8

 py38.patch         | 14 ++++++++++++++
 python-Crypto.spec |  4 +++-
 2 files changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/python-Crypto.spec b/python-Crypto.spec
index 2e809cd..6735829 100644
--- a/python-Crypto.spec
+++ b/python-Crypto.spec
@@ -9,12 +9,13 @@ Summary:	PyCrypto - The Python 2 Cryptography Toolkit
 Summary(pl.UTF-8):	Kryptograficzny przybornik dla języka Python 2
 Name:		python-%{module}
 Version:	2.6.1
-Release:	10
+Release:	11
 # Mostly Public Domain apart from parts of HMAC.py and setup.py, which are Python
 License:	Public Domain and Python
 Group:		Development/Languages/Python
 Source0:	http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-%{version}.tar.gz
 # Source0-md5:	55a61a054aa66812daf5161a0d5d7eda
+Patch0:		py38.patch
 URL:		http://www.dlitz.net/software/pycrypto/
 BuildRequires:	gmp-devel
 %if %{with python2}
@@ -94,6 +95,7 @@ zaimplementowanych dla języka Python 3. Pakiet zawiera między innymi:
 
 %prep
 %setup -q -n pycrypto-%{version}
+%patch0 -p1
 
 %build
 %if %{with python2}
diff --git a/py38.patch b/py38.patch
new file mode 100644
index 0000000..24d1c43
--- /dev/null
+++ b/py38.patch
@@ -0,0 +1,14 @@
+--- pycrypto-2.6.1/lib/Crypto/Random/_UserFriendlyRNG.py.org	2019-10-29 15:53:40.311134311 +0100
++++ pycrypto-2.6.1/lib/Crypto/Random/_UserFriendlyRNG.py	2019-10-29 15:55:46.281436245 +0100
+@@ -74,7 +74,10 @@ class _EntropyCollector(object):
+         self._time_es.feed(struct.pack("@I", int(2**30 * (t - floor(t)))))
+ 
+         # Add the fractional part of time.clock()
+-        t = time.clock()
++        try:
++            t = time.clock()
++        except AttributeError:
++            t = time.process_time()
+         self._clock_es.feed(struct.pack("@I", int(2**30 * (t - floor(t)))))
+ 
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-Crypto.git/commitdiff/1710ef62f4c2b989aacfbe32ae35534927b487bf



More information about the pld-cvs-commit mailing list