From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 236CD13835A for ; Sat, 31 Oct 2020 01:36:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3E245E0844; Sat, 31 Oct 2020 01:36:58 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 24EADE0844 for ; Sat, 31 Oct 2020 01:36:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CE4CB340B98 for ; Sat, 31 Oct 2020 01:36:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3051E42A for ; Sat, 31 Oct 2020 01:36:54 +0000 (UTC) From: "Patrick McLean" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrick McLean" Message-ID: <1604108203.95563b148779afd817bc4a2814224790d0089c55.chutzpah@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/libnacl/files/, dev-python/libnacl/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/libnacl/Manifest dev-python/libnacl/files/libnacl-1.7.1-py39.patch dev-python/libnacl/libnacl-1.7.1.ebuild X-VCS-Directories: dev-python/libnacl/files/ dev-python/libnacl/ X-VCS-Committer: chutzpah X-VCS-Committer-Name: Patrick McLean X-VCS-Revision: 95563b148779afd817bc4a2814224790d0089c55 X-VCS-Branch: master Date: Sat, 31 Oct 2020 01:36:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c34a8843-cc8e-47e0-adf4-a7999d584aae X-Archives-Hash: a10c1597926a42a345c99a5f9d458e60 commit: 95563b148779afd817bc4a2814224790d0089c55 Author: Patrick McLean sony com> AuthorDate: Sat Oct 31 00:47:09 2020 +0000 Commit: Patrick McLean gentoo org> CommitDate: Sat Oct 31 01:36:43 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95563b14 dev-python/libnacl-1.7.1: Version bump, add py39 Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-3.0.8, Repoman-3.0.2 Signed-off-by: Patrick McLean gentoo.org> dev-python/libnacl/Manifest | 1 + dev-python/libnacl/files/libnacl-1.7.1-py39.patch | 35 +++++++++++++++++++++++ dev-python/libnacl/libnacl-1.7.1.ebuild | 25 ++++++++++++++++ 3 files changed, 61 insertions(+) diff --git a/dev-python/libnacl/Manifest b/dev-python/libnacl/Manifest index 5a13ab7a786..8ac4bfadb5b 100644 --- a/dev-python/libnacl/Manifest +++ b/dev-python/libnacl/Manifest @@ -1 +1,2 @@ DIST libnacl-1.6.1.tar.gz 39789 BLAKE2B 7c73f67d4faec8d6e53df21eb3c394d4f36754cd9ad1dfa63ef45aab43bb1832cace7446688b2b29b9923539e00d59f3a78c719b8b8770b2c6c217db19dd2f6d SHA512 90fd9302cdfbe84acfc7dff0ac95eeb05fd1bb346cd8b220613174d5d1ae5f627be06b4d588fd4a939c49a119ca557d68a06d3cbe1c0d409a253fdca96d944ac +DIST libnacl-1.7.1.tar.gz 43232 BLAKE2B 4b6d1434280b548740c873ebbf0eec2a85ca67f1fdb5ebfaf27e2ca3673e7d9175f4427e9d3c84b210094e3ad0248d7c1c1db978ae8e977fcebaf20e6e3f719c SHA512 4beb6a5f30688ea72836512f771c566f2c0c03bbdeade4f4135b3068945a3b3e0da826f97a78f495887e852c36629ddb33e876696263404e74fac11e3b7bc9e9 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 00000000000..62fc1e30258 --- /dev/null +++ b/dev-python/libnacl/files/libnacl-1.7.1-py39.patch @@ -0,0 +1,35 @@ +commit 53c1576b21b53156fc30d357b40c88c7eefb50de +Author: Karthikeyan Singaravelan +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.1.ebuild b/dev-python/libnacl/libnacl-1.7.1.ebuild new file mode 100644 index 00000000000..4021fa51ab3 --- /dev/null +++ b/dev-python/libnacl/libnacl-1.7.1.ebuild @@ -0,0 +1,25 @@ +# 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}" + +PATCHES=( + "${FILESDIR}/libnacl-1.7.1-py39.patch" +) + +python_test() { + "${EPYTHON}" -m unittest discover -v -p 'test_*.py' tests/ || die "Tests failed with ${EPYTHON}" +}