diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2025-06-07 19:00:38 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2025-06-07 19:00:38 +0000 |
| commit | c7de950cc674c81d06538441106a69e1bdce00c2 (patch) | |
| tree | 3dc4425973affc40c2fc1e3784006a4517512197 /dev-python/pynacl | |
| parent | 400f169d63c91042a3a28670e64b68e92aa12623 (diff) | |
| download | baldeagleos-repo-c7de950cc674c81d06538441106a69e1bdce00c2.tar.gz baldeagleos-repo-c7de950cc674c81d06538441106a69e1bdce00c2.tar.xz baldeagleos-repo-c7de950cc674c81d06538441106a69e1bdce00c2.zip | |
Adding metadata
Diffstat (limited to 'dev-python/pynacl')
| -rw-r--r-- | dev-python/pynacl/files/pynacl-1.5.0-py314.patch | 58 | ||||
| -rw-r--r-- | dev-python/pynacl/pynacl-1.5.0-r4.ebuild | 54 |
2 files changed, 112 insertions, 0 deletions
diff --git a/dev-python/pynacl/files/pynacl-1.5.0-py314.patch b/dev-python/pynacl/files/pynacl-1.5.0-py314.patch new file mode 100644 index 000000000000..210728b2ea76 --- /dev/null +++ b/dev-python/pynacl/files/pynacl-1.5.0-py314.patch @@ -0,0 +1,58 @@ +https://github.com/pyca/pynacl/commit/d33028e43b814615a33e231925eaddb0f679fa2b + +From d33028e43b814615a33e231925eaddb0f679fa2b Mon Sep 17 00:00:00 2001 +From: Karolina Surma <33810531+befeleme@users.noreply.github.com> +Date: Fri, 15 Nov 2024 04:53:12 +0100 +Subject: [PATCH] Fix compatibility with Python 3.14.0a1 (#848) + +typing.ByteString has been removed from Python 3.14. +Ported the suggested way from the documentation: +https://docs.python.org/3.13/library/typing.html#typing.ByteString +--- + src/nacl/bindings/crypto_secretstream.py | 3 ++- + tests/test_secretstream.py | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/nacl/bindings/crypto_secretstream.py b/src/nacl/bindings/crypto_secretstream.py +index d7c6725e..59b074c5 100644 +--- a/src/nacl/bindings/crypto_secretstream.py ++++ b/src/nacl/bindings/crypto_secretstream.py +@@ -11,7 +11,7 @@ + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. +-from typing import ByteString, Optional, Tuple, cast ++from typing import Optional, Tuple, Union, cast + + from nacl import exceptions as exc + from nacl._sodium import ffi, lib +@@ -73,6 +73,7 @@ class crypto_secretstream_xchacha20poly1305_state: + + def __init__(self) -> None: + """Initialize a clean state object.""" ++ ByteString = Union[bytes, bytearray, memoryview] + self.statebuf: ByteString = ffi.new( + "unsigned char[]", + crypto_secretstream_xchacha20poly1305_STATEBYTES, +diff --git a/tests/test_secretstream.py b/tests/test_secretstream.py +index d1b72739..9a847bb4 100644 +--- a/tests/test_secretstream.py ++++ b/tests/test_secretstream.py +@@ -16,7 +16,7 @@ + import json + import os + import random +-from typing import ByteString, List, Optional, Tuple ++from typing import List, Optional, Tuple, Union + + from _pytest._code import ExceptionInfo + from _pytest.monkeypatch import MonkeyPatch +@@ -219,6 +219,7 @@ def test_it_like_libsodium(): + + header = crypto_secretstream_xchacha20poly1305_init_push(state, k) + ++ ByteString = Union[bytes, bytearray, memoryview] + state_save: ByteString = ffi.buffer(state.statebuf)[:] + + c1 = crypto_secretstream_xchacha20poly1305_push( + diff --git a/dev-python/pynacl/pynacl-1.5.0-r4.ebuild b/dev-python/pynacl/pynacl-1.5.0-r4.ebuild new file mode 100644 index 000000000000..24da0ec28de0 --- /dev/null +++ b/dev-python/pynacl/pynacl-1.5.0-r4.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9,10,11,12,13} pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="Python binding to the Networking and Cryptography (NaCl) library" +HOMEPAGE=" + https://github.com/pyca/pynacl/ + https://pypi.org/project/PyNaCl/ +" +SRC_URI=" + https://github.com/pyca/pynacl/archive/${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" + +DEPEND=" + dev-libs/libsodium:= +" +RDEPEND=" + ${DEPEND} + $(python_gen_cond_dep ' + >=dev-python/cffi-1.4.1[${PYTHON_USEDEP}] + ' 'python*') +" +BDEPEND=" + $(python_gen_cond_dep ' + >=dev-python/cffi-1.4.1[${PYTHON_USEDEP}] + ' 'python*') + test? ( + >=dev-python/hypothesis-3.27.0[${PYTHON_USEDEP}] + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.5.0-py314.patch +) + +distutils_enable_tests pytest + +src_compile() { + # For not using the bundled libsodium + local -x SODIUM_INSTALL=system + distutils-r1_src_compile +} |
