diff options
author | Michał Górny <mgorny@gentoo.org> | 2024-05-25 17:06:21 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-05-25 17:07:47 +0200 |
commit | b20e6746cce1f85506d047fb163f9466e7e90a19 (patch) | |
tree | 38564ff20437010b0efc75c9b5f3e4e71d0d522d /dev-python | |
parent | gui-wm/sway: remove passing of X flag to build system (diff) | |
download | gentoo-b20e6746cce1f85506d047fb163f9466e7e90a19.tar.gz gentoo-b20e6746cce1f85506d047fb163f9466e7e90a19.tar.bz2 gentoo-b20e6746cce1f85506d047fb163f9466e7e90a19.zip |
dev-python/cryptography: Backport 32-bit platform test fix
Closes: https://bugs.gentoo.org/926700
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/cryptography/cryptography-42.0.7.ebuild | 5 | ||||
-rw-r--r-- | dev-python/cryptography/files/cryptography-42.0.7-32bit.patch | 64 |
2 files changed, 69 insertions, 0 deletions
diff --git a/dev-python/cryptography/cryptography-42.0.7.ebuild b/dev-python/cryptography/cryptography-42.0.7.ebuild index d8e7523e9456..0ddcbef8d04b 100644 --- a/dev-python/cryptography/cryptography-42.0.7.ebuild +++ b/dev-python/cryptography/cryptography-42.0.7.ebuild @@ -119,6 +119,11 @@ src_unpack() { } src_prepare() { + local PATCHES=( + # https://github.com/pyca/cryptography/pull/10366 + "${FILESDIR}/${P}-32bit.patch" + ) + default sed -i -e 's:--benchmark-disable::' pyproject.toml || die diff --git a/dev-python/cryptography/files/cryptography-42.0.7-32bit.patch b/dev-python/cryptography/files/cryptography-42.0.7-32bit.patch new file mode 100644 index 000000000000..9bd9d5f19110 --- /dev/null +++ b/dev-python/cryptography/files/cryptography-42.0.7-32bit.patch @@ -0,0 +1,64 @@ +diff --git a/tests/hazmat/primitives/test_aead.py b/tests/hazmat/primitives/test_aead.py +index a1f99ab81..2f0d52d82 100644 +--- a/tests/hazmat/primitives/test_aead.py ++++ b/tests/hazmat/primitives/test_aead.py +@@ -56,7 +56,8 @@ def test_chacha20poly1305_unsupported_on_older_openssl(backend): + ) + class TestChaCha20Poly1305: + @pytest.mark.skipif( +- sys.platform not in {"linux", "darwin"}, reason="mmap required" ++ sys.platform not in {"linux", "darwin"} or sys.maxsize < 2**31, ++ reason="mmap and 64-bit platform required", + ) + def test_data_too_large(self): + key = ChaCha20Poly1305.generate_key() +@@ -197,7 +198,8 @@ class TestChaCha20Poly1305: + ) + class TestAESCCM: + @pytest.mark.skipif( +- sys.platform not in {"linux", "darwin"}, reason="mmap required" ++ sys.platform not in {"linux", "darwin"} or sys.maxsize < 2**31, ++ reason="mmap and 64-bit platform required", + ) + def test_data_too_large(self): + key = AESCCM.generate_key(128) +@@ -378,7 +380,8 @@ def _load_gcm_vectors(): + + class TestAESGCM: + @pytest.mark.skipif( +- sys.platform not in {"linux", "darwin"}, reason="mmap required" ++ sys.platform not in {"linux", "darwin"} or sys.maxsize < 2**31, ++ reason="mmap and 64-bit platform required", + ) + def test_data_too_large(self): + key = AESGCM.generate_key(128) +@@ -525,7 +528,8 @@ def test_aesocb3_unsupported_on_older_openssl(backend): + ) + class TestAESOCB3: + @pytest.mark.skipif( +- sys.platform not in {"linux", "darwin"}, reason="mmap required" ++ sys.platform not in {"linux", "darwin"} or sys.maxsize < 2**31, ++ reason="mmap and 64-bit platform required", + ) + def test_data_too_large(self): + key = AESOCB3.generate_key(128) +@@ -700,7 +704,8 @@ class TestAESOCB3: + ) + class TestAESSIV: + @pytest.mark.skipif( +- sys.platform not in {"linux", "darwin"}, reason="mmap required" ++ sys.platform not in {"linux", "darwin"} or sys.maxsize < 2**31, ++ reason="mmap and 64-bit platform required", + ) + def test_data_too_large(self): + key = AESSIV.generate_key(256) +@@ -844,7 +849,8 @@ class TestAESSIV: + ) + class TestAESGCMSIV: + @pytest.mark.skipif( +- sys.platform not in {"linux", "darwin"}, reason="mmap required" ++ sys.platform not in {"linux", "darwin"} or sys.maxsize < 2**31, ++ reason="mmap and 64-bit platform required", + ) + def test_data_too_large(self): + key = AESGCMSIV.generate_key(256) |