From a1d7c38722994d6aab87dcaa13e48d36827a5f36a1291913c69444c144c240b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 7 Oct 2024 15:36:01 +0000 Subject: [PATCH] - Update to 0.4.1 * Added support for Python 3.13 - Add upstream pyasn1-061.patch to fix tests with recent pyasn1 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyasn1-modules?expand=0&rev=66 --- .gitattributes | 23 +++ .gitignore | 1 + pyasn1-061.patch | 168 ++++++++++++++++++ pyasn1_modules-0.4.0.tar.gz | 3 + pyasn1_modules-0.4.1.tar.gz | 3 + python-pyasn1-modules.changes | 311 ++++++++++++++++++++++++++++++++++ python-pyasn1-modules.spec | 66 ++++++++ 7 files changed, 575 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 pyasn1-061.patch create mode 100644 pyasn1_modules-0.4.0.tar.gz create mode 100644 pyasn1_modules-0.4.1.tar.gz create mode 100644 python-pyasn1-modules.changes create mode 100644 python-pyasn1-modules.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/pyasn1-061.patch b/pyasn1-061.patch new file mode 100644 index 0000000..99de11d --- /dev/null +++ b/pyasn1-061.patch @@ -0,0 +1,168 @@ +From 079c176eb00ed7352c9696efa12a0577beeecd71 Mon Sep 17 00:00:00 2001 +From: Heiko Becker +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/pyasn1_modules-0.4.0.tar.gz b/pyasn1_modules-0.4.0.tar.gz new file mode 100644 index 0000000..c631e72 --- /dev/null +++ b/pyasn1_modules-0.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:831dbcea1b177b28c9baddf4c6d1013c24c3accd14a1873fffaa6a2e905f17b6 +size 307859 diff --git a/pyasn1_modules-0.4.1.tar.gz b/pyasn1_modules-0.4.1.tar.gz new file mode 100644 index 0000000..1f7818c --- /dev/null +++ b/pyasn1_modules-0.4.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c28e2dbf9c06ad61c71a075c7e0f9fd0f1b0bb2d2ad4377f240d33ac2ab60a7c +size 310028 diff --git a/python-pyasn1-modules.changes b/python-pyasn1-modules.changes new file mode 100644 index 0000000..63197e9 --- /dev/null +++ b/python-pyasn1-modules.changes @@ -0,0 +1,311 @@ +------------------------------------------------------------------- +Mon Oct 7 15:29:49 UTC 2024 - Markéta Machová + +- Update to 0.4.1 + * Added support for Python 3.13 +- Add upstream pyasn1-061.patch to fix tests with recent pyasn1 + +------------------------------------------------------------------- +Thu Mar 28 12:16:19 UTC 2024 - Dirk Müller + +- update to 0.4.0: + * Added support for Python 3.11, 3.12 + * Removed support for EOL Pythons 2.7, 3.6, 3.7 + +------------------------------------------------------------------- +Thu May 4 19:28:21 UTC 2023 - Dirk Müller + +- update to 0.3.0: + * Added support for Python 3.8, 3.9, 3.10, 3.11 + * Removed support for EOL Pythons 2.4, 2.5, 2.6, 3.2, 3.3, 3.4, + 3.5 + * Added support for PyPy 3.7, 3.8, 3.9 + * Modernized packaging and testing. pyasn1-modules now uses + ``setup.cfg``, ``pyproject.toml``, + * PyPI package ownership for `pyasn1` and `pyasn1-module` has + been transfered to *Christian Heimes* and *Simon Pichugin* in + * The upstream repositories for `pyasn1` and `pyasn1-modules` + are now in the GitHub organization https://github.com/pyasn1/. + * Added tox runner with a handful of basic jobs + * Add RFC3125 providing Electronic Signature Policies + * Add RFC5126 providing CMS Advanced Electronic Signatures + * Improve test routines for RFC5126 + * Add RFC4387 providing Certificate Store Access via HTTP + * Changed assertion in unit tests from Python built-in to + `unittest` provided + * Add RFC8692 providing Algorithm Identifiers for RSASSA-PSS + and ECDSA Using SHAKEs + * Add RFC5753 providing CMS Elliptic Curve Cryptography + Algorithms + * Add RFC3820 providing Proxy Certificates + * Add RFC3370 providing Cryptographic Message Syntax (CMS) + Algorithms + * Add RFC3537 providing HMAC Key Wrapping + * Add RFC3739 providing Qualified Certificates + * Add RFC2876 providing KEA and SKIPJACK for CMS + * Add RFC3058 providing IDEA Encryption Algorithm for CMS + * Add RFC3657 providing Camellia Encryption Algorithm for CMS + * Add RFC4010 providing SEED Encryption Algorithm for CMS + * Add RFC4357 providing Additional Cryptographic Algorithms for + * Add RFC4490 providing GOST 28147-89, GOST R 34.11-94, GOST R + 34.10-94, and GOST R 34.10-2001 Algorithms for CMS + * Add RFC4491 providing GOST R 34.10-94, GOST R 34.10-2001, and + GOST R 34.11-94 Algorithms for certificates and CRLs + * Add RFC8696 providing using Pre-Shared Key (PSK) in the CMS + * Add RFC5639 providing identifiers for the Brainpool curves in + Elliptic Curve Cryptography + * Add RFC5697 providing Other Certificates Extension + * Add RFC4683 providing Subject Identification Method (SIM) + * Add RFC4476 providing Attribute Certificate Policies + Extension + * Add RFC5636 providing Traceable Anonymous Certificate + * Add RFC5752 providing Multiple Signatures attribute for CMS + * Add RFC5275 providing CMS Symmetric Key Management and + Distribution + * Add RFC8702 providing SHAKE One-way Hash Functions in the CMS + * Add RFC8708 providing HSS/LMS Hash-based Signature Algorithm + for CMS + * Advance copyright statement to year 2020 + * Add RFC8769 providing CBOR and CBOR Sequence content types + for CMS + +------------------------------------------------------------------- +Fri Apr 21 12:30:22 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:43:31 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Sat Feb 8 20:40:52 UTC 2020 - Arun Persaud + +- specfile: + * update copyright year + * be more specific in %files section + +- update to version 0.2.8: + * Improve test routines for modules that use certificate extensions + * Improve test for RFC3709 with a real world certificate + * Added RFC7633 providing TLS Features Certificate Extension + * Added RFC7229 providing OIDs for Test Certificate Policies + * Added tests for RFC3280, RFC3281, RFC3852, and RFC4211 + * Added RFC6960 providing Online Certificate Status Protocol (OCSP) + * Added RFC6955 providing Diffie-Hellman Proof-of-Possession + Algorithms + * Updated the handling of maps for use with openType for RFC 3279 + * Added RFC6486 providing RPKI Manifests + * Added RFC6487 providing Profile for X.509 PKIX Resource + Certificates + * Added RFC6170 providing Certificate Image in the Internet X.509 + Public Key Infrastructure, and import the object identifier into + RFC3709. + * Added RFC6187 providing Certificates for Secure Shell + Authentication + * Added RFC6482 providing RPKI Route Origin Authorizations (ROAs) + * Added RFC6664 providing S/MIME Capabilities for Public Keys + * Added RFC6120 providing Extensible Messaging and Presence Protocol + names in certificates + * Added RFC4985 providing Subject Alternative Name for expression of + service names in certificates + * Added RFC5924 providing Extended Key Usage for Session Initiation + Protocol (SIP) in X.509 certificates + * Added RFC5916 providing Device Owner Attribute + * Added RFC7508 providing Securing Header Fields with S/MIME + * Update RFC8226 to use ComponentPresentConstraint() instead of the + previous work around + * Add RFC2631 providing OtherInfo for Diffie-Hellman Key Agreement + * Add RFC3114 providing test values for the S/MIME Security Label + * Add RFC5755 providing Attribute Certificate Profile for + Authorization + * Add RFC5913 providing Clearance Attribute and Authority Clearance + Constraints Certificate Extension + * Add RFC5917 providing Clearance Sponsor Attribute + * Add RFC4043 providing Internet X.509 PKI Permanent Identifier + * Add RFC7585 providing Network Access Identifier (NAI) Realm Name + for Certificates + * Update RFC3770 to support openType for attributes and reported + errata + * Add RFC4334 providing Certificate Extensions and Attributes for + Authentication in PPP and Wireless LAN Networks + +------------------------------------------------------------------- +Sun Nov 17 09:11:49 UTC 2019 - Michael Ströder + +- Update to 0.2.7 + * various RFC enhancements, see CHANGES.txt + +------------------------------------------------------------------- +Tue Sep 10 12:44:26 UTC 2019 - Tomáš Chvátal + +- Update to 0.2.6: + * various RFC enhancements, see CHANGES.txt + +------------------------------------------------------------------- +Sat May 25 09:39:16 UTC 2019 - Tomáš Chvátal + +- Update to 0.2.5: + - Added RFC3560 providing RSAES-OAEP Key Transport Algorithm + in CMS + - Added RFC6019 providing BinaryTime - an alternate format + for representing Date and Time + - RFC3565 superseded by RFC5649 + - Added RFC5480 providng Elliptic Curve Cryptography Subject + Public Key Information + - Added RFC8520 providing X.509 Extensions for MUD URL and + MUD Signer + - Added RFC3161 providing Time-Stamp Protocol support + - Added RFC3709 providing Logotypes in X.509 Certificates + - Added RFC3274 providing CMS Compressed Data Content Type + - Added RFC4073 providing Multiple Contents protection + with CMS +- Execute testsuite + +------------------------------------------------------------------- +Mon Jan 28 14:26:26 UTC 2019 - Michael Ströder + +- update to version 0.2.4 + +Revision 0.2.4: +- Added modules for RFC8226 implementing JWT Claim Constraints + and TN Authorization List for X.509 certificate extensions +- Fixed bug in `rfc5280.AlgorithmIdentifier` ANY type definition + +Revision 0.2.3: +- Added modules for RFC5083 and RFC5084 (CMS) +- Copyright notice extended to the year 2019 + +------------------------------------------------------------------- +Tue Jul 3 10:21:47 UTC 2018 - michael@stroeder.com + +- update to version 0.2.2: + * Copyright notice extended to the year 2018 + * Migrated references from SourceForge + * rfc2986 module added + +------------------------------------------------------------------- +Sun Nov 26 21:20:48 UTC 2017 - arun@gmx.de + +- update to version 0.2.1: + * Allow ANY DEFINED BY objects expanding automatically if requested + * Imports PEP8'ed + +------------------------------------------------------------------- +Thu Oct 12 07:45:00 UTC 2017 - michael@stroeder.com + +- Update to upstream release 0.1.5 + * OCSP response blob fixed in test + * Fixed wrong OCSP ResponderID components tagging + +------------------------------------------------------------------- +Thu Sep 7 22:05:22 UTC 2017 - michael@stroeder.com + +- Update to upstream release 0.1.4 + * more onversion pinning + +------------------------------------------------------------------- +Thu Sep 7 12:03:08 UTC 2017 - michael@stroeder.com + +- Update to upstream release 0.1.2 + * Tests refactored into proper unit tests + * pem.readBase64fromText() convenience function added + * Pinned to pyasn1 0.3.4+ + +------------------------------------------------------------------- +Tue Aug 15 17:34:02 UTC 2017 - michael@stroeder.com + +- Update to upstream release 0.0.11 + * Fixed typo in ASN.1 definitions at rfc2315.py + +------------------------------------------------------------------- +Sat Jul 29 21:04:04 UTC 2017 - michael@stroeder.com + +- Updated project URL +- Update to upstream release 0.0.10 + * Fixed SequenceOf initializer to pass now-mandatory componentType + keyword argument (since pyasn1 0.3.1) + * Temporarily fixed recursive ASN.1 type definition to work with + pyasn1 0.3.1+. This is going to be fixed properly shortly. + +------------------------------------------------------------------- +Wed Jun 14 12:44:59 UTC 2017 - michael@stroeder.com + +- Update to upstream release 0.0.9 + * More CRL data structures added (RFC3279) + * Added X.509 certificate extensions map + * Added X.509 attribute type map + * Fix to __doc__ use in setup.py to make -O0 installation mode working + * Copyright added to source files + * More PEP-8'ing done on the code + * Author's e-mail changed + +------------------------------------------------------------------- +Thu Mar 16 13:46:56 UTC 2017 - tbechtold@suse.com + +- Switch to singlespec approach + +------------------------------------------------------------------- +Tue Dec 29 17:10:09 UTC 2015 - michael@stroeder.com + +- Update to upstream release 0.0.8 + - Wheel distribution format now supported + - Fix to misspelled rfc2459.id_at_sutname variable + - Fix to misspelled rfc2459.NameConstraints component tag ID + - Fix to misspelled rfc2459.GeneralSubtree component default status + +------------------------------------------------------------------- +Thu Aug 13 13:02:16 UTC 2015 - michael@stroeder.com + +- Added file ext .txt to doc files like in upstream +- Update to upstream release 0.0.7 + - Extensions added to text files, CVS attic flushed. + - Fix to rfc2459.BasicConstraints syntax. + +------------------------------------------------------------------- +Sat Jul 4 20:46:59 UTC 2015 - michael@stroeder.com + +- Update to upstream release 0.0.6 + - Typo fix to id_kp_serverAuth object value + - A test case for indefinite length encoding eliminated as it's + forbidden in DER. + +------------------------------------------------------------------- +Thu Oct 24 11:11:23 UTC 2013 - speilicke@suse.com + +- Require python-setuptools instead of distribute (upstreams merged) + +------------------------------------------------------------------- +Tue May 7 08:25:25 UTC 2013 - michael@stroeder.com + +- Update to upstream release 0.0.5 + +Revision 0.0.5 +-------------- + +- License updated to vanilla BSD 2-Clause to ease package use + (http://opensource.org/licenses/BSD-2-Clause). + +------------------------------------------------------------------- +Wed Jan 2 19:44:41 UTC 2013 - toddrme2178@gmail.com + +- Fix building on SLES + +------------------------------------------------------------------- +Fri Jul 27 18:03:12 UTC 2012 - michael@stroeder.com + +- Update to upstream release 0.0.4 + +The pyasn1-modules collection now includes Certificate Management Protocol +(RFC4210) data structures. + +------------------------------------------------------------------- +Mon Apr 23 19:23:07 UTC 2012 - michael@stroeder.com + +- Update to upstream release 0.0.3 + +------------------------------------------------------------------- +Fri Mar 23 09:58:53 UTC 2012 - michael@stroeder.com + +- Initial submission of upstream release 0.0.2 diff --git a/python-pyasn1-modules.spec b/python-pyasn1-modules.spec new file mode 100644 index 0000000..4057eec --- /dev/null +++ b/python-pyasn1-modules.spec @@ -0,0 +1,66 @@ +# +# spec file for package python-pyasn1-modules +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-pyasn1-modules +Version: 0.4.1 +Release: 0 +Summary: Collection of protocols modules written in ASN.1 language +License: BSD-3-Clause +Group: Development/Languages/Python +URL: https://github.com/pyasn1/pyasn1-modules +Source: https://files.pythonhosted.org/packages/source/p/pyasn1-modules/pyasn1_modules-%{version}.tar.gz +# PATCH-FIX-UPSTREAM https://github.com/pyasn1/pyasn1-modules/pull/22 Stop using pyasn1.compat.octets +Patch0: pyasn1-061.patch +BuildRequires: %{python_module base >= 3.8} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pyasn1 >= 0.4.7} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-pyasn1 >= 0.4.7 +BuildArch: noarch +%python_subpackages + +%description +This is an implementation of ASN.1 types and codecs in Python programming +language. It has been first written to support particular protocol (SNMP) but +then generalized to be suitable for a wide range of protocols based on ASN.1 +specification. + +%prep +%autosetup -p1 -n pyasn1_modules-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest + +%files %{python_files} +%license LICENSE.txt +%doc CHANGES.txt README.md +%{python_sitelib}/pyasn1_modules +%{python_sitelib}/pyasn1_modules-%{version}.dist-info + +%changelog