summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--0001-replaced-time.clock-with-time.process_time-time-cloc.patch28
-rw-r--r--PKGBUILD21
3 files changed, 48 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8f189505c54d..010edfa88ebd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = python-pycrypto
pkgdesc = Cryptographic primitives and algorithms for Python
pkgver = 2.6.1
- pkgrel = 3
+ pkgrel = 4
url = https://pypi.python.org/pypi/pycrypto
arch = any
license = Public domain
@@ -10,7 +10,9 @@ pkgbase = python-pycrypto
provides = python-pycryptodome
provides = python-crypto
source = https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz
- sha256sums = f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c
+ source = 0001-replaced-time.clock-with-time.process_time-time-cloc.patch
+ sha512sums = 20a4aed4dac4e9e61d773ebc1d48ea577e9870c33f396be53d075a9bf8487d93e75e200179882d81e452efd0f6751789bac434f6f431b3e7c1c8ef9dba392847
+ sha512sums = 9a8c9812b3a13701571cb9cebb2fd755be7206f4045cbec76375259b716c2769dd25996cd8af89248cf7d9de0b088193a245442169c0c645ccd6083b529e3e50
pkgname = python-pycrypto
diff --git a/0001-replaced-time.clock-with-time.process_time-time-cloc.patch b/0001-replaced-time.clock-with-time.process_time-time-cloc.patch
new file mode 100644
index 000000000000..bd203159ebd8
--- /dev/null
+++ b/0001-replaced-time.clock-with-time.process_time-time-cloc.patch
@@ -0,0 +1,28 @@
+From 6d41ad025331afce9e495d7be3205730ddfa8f07 Mon Sep 17 00:00:00 2001
+From: Fabian Topfstedt <topfstedt@schneevonmorgen.com>
+Date: Mon, 18 Nov 2019 22:19:35 +0100
+Subject: [PATCH] replaced time.clock with time.process_time (time clock was
+ flagged as deprecated in Python 3.3 and got removed in Python 3.8)
+
+---
+ lib/Crypto/Random/_UserFriendlyRNG.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Crypto/Random/_UserFriendlyRNG.py b/lib/Crypto/Random/_UserFriendlyRNG.py
+index 957e006..f389cfc 100644
+--- a/lib/Crypto/Random/_UserFriendlyRNG.py
++++ b/lib/Crypto/Random/_UserFriendlyRNG.py
+@@ -73,8 +73,8 @@ class _EntropyCollector(object):
+ t = time.time()
+ self._time_es.feed(struct.pack("@I", int(2**30 * (t - floor(t)))))
+
+- # Add the fractional part of time.clock()
+- t = time.clock()
++ # Add the fractional part of time.process_time()
++ t = time.process_time()
+ self._clock_es.feed(struct.pack("@I", int(2**30 * (t - floor(t)))))
+
+
+--
+2.27.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 60831d4db682..2f24f1a59442 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,10 +1,11 @@
-# Contributor(s): Drew DeVault <sir@cmpwn.com>
-# Maintainer: Bruce Zhang <zttt183525594@gmail.com>
+# Contributor: Drew DeVault <sir@cmpwn.com>
+# Contributor: Bruce Zhang <zttt183525594@gmail.com>
+# Maintainer: Davide Depau <davide@depau.eu>
pkgname='python-pycrypto'
_pkgname='pycrypto'
pkgver=2.6.1
-pkgrel=3
+pkgrel=4
pkgdesc='Cryptographic primitives and algorithms for Python'
arch=('any')
url='https://pypi.python.org/pypi/pycrypto'
@@ -12,15 +13,25 @@ license=('Public domain')
depends=('python-flask')
makedepends=('python-setuptools')
provides=('python-pycryptodome' 'python-crypto')
-source=("https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-${pkgver}.tar.gz")
-sha256sums=('f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c')
+source=(
+ "https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-${pkgver}.tar.gz"
+ 0001-replaced-time.clock-with-time.process_time-time-cloc.patch
+)
+sha512sums=('20a4aed4dac4e9e61d773ebc1d48ea577e9870c33f396be53d075a9bf8487d93e75e200179882d81e452efd0f6751789bac434f6f431b3e7c1c8ef9dba392847'
+ '9a8c9812b3a13701571cb9cebb2fd755be7206f4045cbec76375259b716c2769dd25996cd8af89248cf7d9de0b088193a245442169c0c645ccd6083b529e3e50')
build() {
cd "$_pkgname-$pkgver"
python setup.py build
}
+prepare() {
+ cd "$_pkgname-$pkgver"
+ patch -p1 < ../0001-replaced-time.clock-with-time.process_time-time-cloc.patch
+}
+
package() {
cd "$_pkgname-$pkgver"
python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
}
+