summaryrefslogtreecommitdiff
path: root/dev-python/libnacl
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /dev-python/libnacl
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'dev-python/libnacl')
-rw-r--r--dev-python/libnacl/Manifest3
-rw-r--r--dev-python/libnacl/files/libnacl-1.7.1-py39.patch35
-rw-r--r--dev-python/libnacl/libnacl-1.7.2.ebuild22
3 files changed, 60 insertions, 0 deletions
diff --git a/dev-python/libnacl/Manifest b/dev-python/libnacl/Manifest
index 725aacfb2cfb..2556422760f1 100644
--- a/dev-python/libnacl/Manifest
+++ b/dev-python/libnacl/Manifest
@@ -1,3 +1,6 @@
+AUX libnacl-1.7.1-py39.patch 1082 BLAKE2B 34d9a6946ec9cd7435d2d2b9cab427142ee394cecbd45604028d713bc76b390f2c4c6c6d78072e997885cdf57244bbf6344944fdc1f669d604c2f938ca25d975 SHA512 6696e1d9dcfb553fabf2982ab947a29dca46e22b7c143e2f6fa7917920a3f7999e1dc3ccbedec976af914c52134c2c4a7d13993ea683cc88aa021f9620a9bbc0
DIST libnacl-1.6.1.tar.gz 39789 BLAKE2B 7c73f67d4faec8d6e53df21eb3c394d4f36754cd9ad1dfa63ef45aab43bb1832cace7446688b2b29b9923539e00d59f3a78c719b8b8770b2c6c217db19dd2f6d SHA512 90fd9302cdfbe84acfc7dff0ac95eeb05fd1bb346cd8b220613174d5d1ae5f627be06b4d588fd4a939c49a119ca557d68a06d3cbe1c0d409a253fdca96d944ac
+DIST libnacl-1.7.2.tar.gz 43343 BLAKE2B 4f7d03661e1385033c51821bf673c81ced11a1523b371ec7da42ed9cf75bdaadee1e679059dfae85871530652b5fea80bfb91c19a8a1eefb4ecf1b8661f11e19 SHA512 a4efbf73f73d9493ac365efa5a5bd6481f85ce4c880ad236bbf7478090bdea857e78e33e445c4e467d2a2032040863b835f32f9a942d2f1e467015bd76b0d469
EBUILD libnacl-1.6.1.ebuild 539 BLAKE2B ccb3670d51307049905a0c83b804f84ab665209d74c701ff3c03a629bf8a5d4a5d97a5fdba12e28e6f067584ad12c6a5bc2250296bac19ae79aa9d08fe404bad SHA512 231d321231c039dc696d18494d964e2df61aab1dc4fe27d2f8cb70794ffd28dc58670a8f5000c518f2dae723140eaf822670159ae9c4d02687a723f817b7a9b9
+EBUILD libnacl-1.7.2.ebuild 566 BLAKE2B 2e3297c232e0ae6cdbf182fbf47f5f58fe0b9793645c872f9a23a2795c69a29325d27b51b960040c954d7e5cedcd830086e0055b618c433224080a51b407db4b SHA512 4f48389307e98895855f347652cc4f131bbf73b30a59db8ee8ef0d2072d91418893e4adf7f57cb59f1ee102122118a39db1fd45d8b549a5a065a0c211703b0b3
MISC metadata.xml 436 BLAKE2B d4777abed0c62a24f98f7053792402c4aca92cc9e352b7436061bf4669a18a731bb8edb9f79707780e3e2eb7a01daa46ab7d1222729d7708f7558b42cefcef69 SHA512 f8a241e4d71d6d6c682f019d086e4effa58608430a5df8c2f70c29cde07124fec2c37b8c63411b19e50baf2b5486a88ec696e4499e47e64936212f6dce938a2c
diff --git a/dev-python/libnacl/files/libnacl-1.7.1-py39.patch b/dev-python/libnacl/files/libnacl-1.7.1-py39.patch
new file mode 100644
index 000000000000..62fc1e30258d
--- /dev/null
+++ b/dev-python/libnacl/files/libnacl-1.7.1-py39.patch
@@ -0,0 +1,35 @@
+commit 53c1576b21b53156fc30d357b40c88c7eefb50de
+Author: Karthikeyan Singaravelan <tir.karthi@gmail.com>
+Date: Thu Jan 30 22:22:58 2020 +0530
+
+ Remove encoding parameter json.loads for Python 3.9 compatibility.
+
+diff --git a/libnacl/utils.py b/libnacl/utils.py
+index 412d518..e06e078 100644
+--- a/libnacl/utils.py
++++ b/libnacl/utils.py
+@@ -1,6 +1,7 @@
+ # -*- coding: utf-8 -*-
+
+ import struct
++import sys
+ import time
+
+ # Import nacl libs
+@@ -31,7 +32,10 @@ def load_key(path_or_file, serial='json'):
+ key_data = msgpack.load(stream)
+ elif serial == 'json':
+ import json
+- key_data = json.loads(stream.read(), encoding='UTF-8')
++ if sys.version_info[0] >= 3:
++ key_data = json.loads(stream.read())
++ else:
++ key_data = json.loads(stream.read(), encoding='UTF-8')
+ finally:
+ if stream != path_or_file:
+ stream.close()
+@@ -95,4 +99,3 @@ def time_nonce():
+ '''
+ nonce = rand_nonce()
+ return (struct.pack('=d', time.time()) + nonce)[:len(nonce)]
+-
diff --git a/dev-python/libnacl/libnacl-1.7.2.ebuild b/dev-python/libnacl/libnacl-1.7.2.ebuild
new file mode 100644
index 000000000000..22ed96d32aa4
--- /dev/null
+++ b/dev-python/libnacl/libnacl-1.7.2.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=(python3_{6..9})
+inherit distutils-r1
+
+DESCRIPTION="Python ctypes wrapper for libsodium"
+HOMEPAGE="https://libnacl.readthedocs.org/"
+SRC_URI="https://github.com/saltstack/libnacl/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="dev-libs/libsodium"
+BDEPEND="${RDEPEND}"
+
+python_test() {
+ "${EPYTHON}" -m unittest discover -v -p 'test_*.py' tests/ || die "Tests failed with ${EPYTHON}"
+}