summaryrefslogtreecommitdiff
path: root/dev-python/pyasn1-modules
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pyasn1-modules')
-rw-r--r--dev-python/pyasn1-modules/Manifest3
-rw-r--r--dev-python/pyasn1-modules/files/pyasn1-modules-0.4.1-test.patch168
-rw-r--r--dev-python/pyasn1-modules/pyasn1-modules-0.4.1.ebuild37
3 files changed, 208 insertions, 0 deletions
diff --git a/dev-python/pyasn1-modules/Manifest b/dev-python/pyasn1-modules/Manifest
index 423f48e9ee53..e8468530388c 100644
--- a/dev-python/pyasn1-modules/Manifest
+++ b/dev-python/pyasn1-modules/Manifest
@@ -1,3 +1,6 @@
+AUX pyasn1-modules-0.4.1-test.patch 6150 BLAKE2B f90e13fdaa1be173ba568024541c4074f023d0140e3945117abe117e8acdb9a6172107d79214757a4e18deb08d2ad47999a7107b77d1a2d7ccf1a1e0d44110dd SHA512 ef3d7e8ba85bfc896b2125946b40e81dc50a0ef9125eee213bc395422cc3bf99fae76bf40392efb7202eda0a86cb9238ccb879620483fb72415fc4b899338afb
DIST pyasn1_modules-0.4.0.tar.gz 307859 BLAKE2B 7808c3ad72cda2292fa358a066cb401884a785281c5ba3c28ec5cbf1a7c7408031ff1018f4e0c4e53ac227a6b7082bb5572216ab12074c90f0a3159330ec3f35 SHA512 d28cbb44788b3a33b9da807d273a6afab38ff420e8ce1264a9ebc68beb003f9ac9673210a5eb829d17ed1ae01798f856a0409dcbcd1a17b489c767d4b11467d3
+DIST pyasn1_modules-0.4.1.tar.gz 310028 BLAKE2B dcffd13196982fb9f4808a789252b9c9910bff3c3eb3e852d13cf1e1285bac4f2900dc62698d9929da4ff882e5d823f2e5290fecd1488e5b61d04c62fe24e2ec SHA512 d3716cafbfe940c5415cb59073897cd15d69b9723064ba581b7d573fe9a0fad9872d88517fe03b0db5b4fa93f8cd3254372e71d60ff5975013c97409b6c22d1d
EBUILD pyasn1-modules-0.4.0.ebuild 728 BLAKE2B 79aee628d2a7d1c5da5655b5bd9edb3336f7684c21a6454aec8df5c930475fd90a1f8fafd99074dfd77a725030ccf1be093ad66d3bd6b8fc9e69f4f9bceedc77 SHA512 201d5826cf5251d757a5acc9d6e3b0c8b00cb2232466abf3415c25f3984e0032c8b197918a6445ef8bc71da0f0a1070ee0c1211045115628d253f16a27ad1788
+EBUILD pyasn1-modules-0.4.1.ebuild 832 BLAKE2B 2204d3dc3c2436fcb887de6c52f8faa49ecbd6a3c039bd2281e1d687744f44f4c53964ccdd9f3c342d85b561f313ac1e53bf89f3ba07be3c4949db39958a6fb2 SHA512 ea50f30f6890639a9c38bf121793864aac7561135c84ec348c888c73f6e9a98710acc4680452188f00006a51193231281a190195c2750b6c5da867e6ac320229
MISC metadata.xml 403 BLAKE2B 2377224f9e8784560e1cb62b77e5bc22c225e815535d1e99aca5453d6155addcc4edeb6252131f7721d82ef6ac296cc82ba2cc58b824f3d71a6ff1c44e4fb7f9 SHA512 1978f00f1590cc46567ea1e565b5adf311b1d0384f253ff6422b76306f70f3def2eae00babe7b36e97c5bea2c81c8488c8c8df1d1f618fcc201a4a7c68c94d2e
diff --git a/dev-python/pyasn1-modules/files/pyasn1-modules-0.4.1-test.patch b/dev-python/pyasn1-modules/files/pyasn1-modules-0.4.1-test.patch
new file mode 100644
index 000000000000..979e5f8d9c78
--- /dev/null
+++ b/dev-python/pyasn1-modules/files/pyasn1-modules-0.4.1-test.patch
@@ -0,0 +1,168 @@
+From 079c176eb00ed7352c9696efa12a0577beeecd71 Mon Sep 17 00:00:00 2001
+From: Heiko Becker <mail@heiko-becker.de>
+Date: Wed, 25 Sep 2024 22:38:42 +0200
+Subject: [PATCH] Stop using pyasn1.compat.octets
+
+It was removed from pyasn1 in
+https://github.com/pyasn1/pyasn1/commit/6f770ba886a8931c35cb090a5c3a6d67f5a41bd9
+
+Fixes #19.
+---
+ tests/test_pem.py | 3 +--
+ tests/test_rfc3770.py | 3 +--
+ tests/test_rfc4073.py | 3 +--
+ tests/test_rfc4334.py | 3 +--
+ tests/test_rfc5755.py | 3 +--
+ tests/test_rfc6032.py | 7 +++----
+ tests/test_rfc6120.py | 1 -
+ 7 files changed, 8 insertions(+), 15 deletions(-)
+
+diff --git a/tests/test_pem.py b/tests/test_pem.py
+index dbcca5a7..e0fe334d 100644
+--- a/tests/test_pem.py
++++ b/tests/test_pem.py
+@@ -7,7 +7,6 @@
+ import sys
+ import unittest
+
+-from pyasn1.compat.octets import ints2octs
+ from pyasn1_modules import pem
+
+
+@@ -93,7 +92,7 @@ def testReadBase64fromText(self):
+ 24, 102, 241, 236, 50
+ ]
+
+- self.assertEqual(ints2octs(expected), binary)
++ self.assertEqual(bytes(expected), binary)
+
+
+ suite = unittest.TestLoader().loadTestsFromModule(sys.modules[__name__])
+diff --git a/tests/test_rfc3770.py b/tests/test_rfc3770.py
+index 667ab249..93d40932 100644
+--- a/tests/test_rfc3770.py
++++ b/tests/test_rfc3770.py
+@@ -10,7 +10,6 @@
+
+ from pyasn1.codec.der.decoder import decode as der_decoder
+ from pyasn1.codec.der.encoder import encode as der_encoder
+-from pyasn1.compat.octets import str2octs
+
+ from pyasn1_modules import pem
+ from pyasn1_modules import rfc5480
+@@ -79,7 +78,7 @@ def testOpenTypes(self):
+ self.assertEqual(extn['extnValue'], der_encoder(extnValue))
+
+ if extn['extnID'] == rfc3770.id_pe_wlanSSID:
+- self.assertIn(str2octs('Example'), extnValue)
++ self.assertIn(b'Example', extnValue)
+
+ if extn['extnID'] == rfc5280.id_ce_extKeyUsage:
+ self.assertIn(rfc3770.id_kp_eapOverLAN, extnValue)
+diff --git a/tests/test_rfc4073.py b/tests/test_rfc4073.py
+index 4bd5e5f7..3b516ccb 100644
+--- a/tests/test_rfc4073.py
++++ b/tests/test_rfc4073.py
+@@ -10,7 +10,6 @@
+
+ from pyasn1.codec.der.decoder import decode as der_decoder
+ from pyasn1.codec.der.encoder import encode as der_encoder
+-from pyasn1.compat.octets import str2octs
+
+ from pyasn1_modules import pem
+ from pyasn1_modules import rfc2634
+@@ -131,7 +130,7 @@ def testOpenTypes(self):
+
+ self.assertIn(next_ci['contentType'], rfc5652.cmsContentTypesMap)
+ self.assertEqual(rfc5652.id_data, next_ci['contentType'])
+- self.assertIn(str2octs('Content-Type: text'), next_ci['content'])
++ self.assertIn(b'Content-Type: text', next_ci['content'])
+
+ for attr in ci['content']['attrs']:
+ self.assertIn(attr['attrType'], rfc5652.cmsAttributesMap)
+diff --git a/tests/test_rfc4334.py b/tests/test_rfc4334.py
+index 9ba5fdf3..e180d676 100644
+--- a/tests/test_rfc4334.py
++++ b/tests/test_rfc4334.py
+@@ -10,7 +10,6 @@
+
+ from pyasn1.codec.der.decoder import decode as der_decoder
+ from pyasn1.codec.der.encoder import encode as der_encoder
+-from pyasn1.compat.octets import str2octs
+
+ from pyasn1_modules import pem
+ from pyasn1_modules import rfc5280
+@@ -67,7 +66,7 @@ def testOpenTypes(self):
+ self.assertEqual(extn['extnValue'], der_encoder(extnValue))
+
+ if extn['extnID'] == rfc4334.id_pe_wlanSSID:
+- self.assertIn( str2octs('Example'), extnValue)
++ self.assertIn(b'Example', extnValue)
+
+ if extn['extnID'] == rfc5280.id_ce_extKeyUsage:
+ self.assertIn(rfc4334.id_kp_eapOverLAN, extnValue)
+diff --git a/tests/test_rfc5755.py b/tests/test_rfc5755.py
+index cf4a05fa..46908e23 100644
+--- a/tests/test_rfc5755.py
++++ b/tests/test_rfc5755.py
+@@ -10,7 +10,6 @@
+
+ from pyasn1.codec.der.decoder import decode as der_decoder
+ from pyasn1.codec.der.encoder import encode as der_encoder
+-from pyasn1.compat.octets import str2octs
+
+ from pyasn1_modules import pem
+ from pyasn1_modules import rfc5280
+@@ -85,7 +84,7 @@ def testOpenTypes(self):
+ count += 1
+ if attr['type'] == rfc5755.id_aca_authenticationInfo:
+ self.assertEqual(
+- str2octs('password'), attr['values'][0]['authInfo'])
++ b'password', attr['values'][0]['authInfo'])
+
+ self.assertEqual(5, count)
+
+diff --git a/tests/test_rfc6032.py b/tests/test_rfc6032.py
+index 287bad89..2327416d 100644
+--- a/tests/test_rfc6032.py
++++ b/tests/test_rfc6032.py
+@@ -10,7 +10,6 @@
+
+ from pyasn1.codec.der.decoder import decode as der_decoder
+ from pyasn1.codec.der.encoder import encode as der_encoder
+-from pyasn1.compat.octets import str2octs
+
+ from pyasn1_modules import pem
+ from pyasn1_modules import rfc5652
+@@ -64,7 +63,7 @@ def testDerCodec(self):
+ self.assertFalse(rest)
+ self.assertTrue(keyid.prettyPrint())
+ self.assertEqual(attrVal0, der_encoder(keyid))
+- self.assertEqual(str2octs('ptf-kdc-812374'), keyid)
++ self.assertEqual(b'ptf-kdc-812374', keyid)
+
+ def testOpenTypes(self):
+ substrate = pem.readBase64fromText(self.encrypted_key_pkg_pem_text)
+@@ -86,8 +85,8 @@ def testOpenTypes(self):
+ self.assertNotEqual('0x', attr['attrValues'][0].prettyPrint()[:2])
+
+ if attr['attrType'] == rfc6032.id_aa_KP_contentDecryptKeyID:
+- self.assertEqual(str2octs(
+- 'ptf-kdc-812374'), attr['attrValues'][0])
++ self.assertEqual(
++ b'ptf-kdc-812374', attr['attrValues'][0])
+
+
+ suite = unittest.TestLoader().loadTestsFromModule(sys.modules[__name__])
+diff --git a/tests/test_rfc6120.py b/tests/test_rfc6120.py
+index bdedab8c..a6217454 100644
+--- a/tests/test_rfc6120.py
++++ b/tests/test_rfc6120.py
+@@ -10,7 +10,6 @@
+
+ from pyasn1.codec.der.decoder import decode as der_decoder
+ from pyasn1.codec.der.encoder import encode as der_encoder
+-from pyasn1.compat.octets import str2octs
+
+ from pyasn1_modules import pem
+ from pyasn1_modules import rfc5280
diff --git a/dev-python/pyasn1-modules/pyasn1-modules-0.4.1.ebuild b/dev-python/pyasn1-modules/pyasn1-modules-0.4.1.ebuild
new file mode 100644
index 000000000000..ebaaaebce833
--- /dev/null
+++ b/dev-python/pyasn1-modules/pyasn1-modules-0.4.1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..13} pypy3 )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="pyasn1 modules"
+HOMEPAGE="
+ https://pypi.org/project/pyasn1-modules/
+ https://github.com/pyasn1/pyasn1-modules/
+"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+
+RDEPEND="
+ <dev-python/pyasn1-0.7.0[${PYTHON_USEDEP}]
+ >=dev-python/pyasn1-0.4.6[${PYTHON_USEDEP}]
+"
+
+distutils_enable_tests unittest
+
+PATCHES=(
+ # https://github.com/pyasn1/pyasn1-modules/pull/22
+ "${FILESDIR}/${P}-test.patch"
+)
+
+python_install_all() {
+ distutils-r1_python_install_all
+ insinto /usr/share/${P}
+ doins -r tools
+}