From c0213d52af45cf2e134e8d1db4b709ae96dead9f Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Sat, 4 Apr 2026 23:29:08 +0300 Subject: [PATCH] python-pyasn1-modules: update to 0.4.2 Update package to 0.4.2. Changelog: - 0.3.0: Updated ASN.1 module imports to use RFC-based names - 0.4.0: Added support for newer RFC modules and improved compatibility - 0.4.1: Minor bug fixes - 0.4.2: Latest stable release Add PYPI_SOURCE_NAME since PyPI switched sdist filename to use underscores (pyasn1_modules-0.4.2.tar.gz). Add test.sh to verify basic functionality. Signed-off-by: Alexandru Ardelean --- lang/python/python-pyasn1-modules/Makefile | 7 ++++--- lang/python/python-pyasn1-modules/test.sh | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 lang/python/python-pyasn1-modules/test.sh diff --git a/lang/python/python-pyasn1-modules/Makefile b/lang/python/python-pyasn1-modules/Makefile index 71a9b1f61b..d65c3d7223 100644 --- a/lang/python/python-pyasn1-modules/Makefile +++ b/lang/python/python-pyasn1-modules/Makefile @@ -8,11 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-pyasn1-modules -PKG_VERSION:=0.2.8 -PKG_RELEASE:=2 +PKG_VERSION:=0.4.2 +PKG_RELEASE:=1 PYPI_NAME:=pyasn1-modules -PKG_HASH:=905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e +PYPI_SOURCE_NAME:=pyasn1_modules +PKG_HASH:=677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6 PKG_LICENSE:=BSD-2-Clause PKG_LICENSE_FILES:=LICENSE.txt diff --git a/lang/python/python-pyasn1-modules/test.sh b/lang/python/python-pyasn1-modules/test.sh new file mode 100644 index 0000000000..ee404d9c37 --- /dev/null +++ b/lang/python/python-pyasn1-modules/test.sh @@ -0,0 +1,20 @@ +#!/bin/sh +[ "$1" = python3-pyasn1-modules ] || exit 0 + +python3 - << 'EOF' +import pyasn1_modules +from pyasn1_modules import pem, rfc2314, rfc2459, rfc2986, rfc5280 +from pyasn1.codec.der.decoder import decode as der_decode +from pyasn1.type import univ + +# Basic OID parsing (common in ASN.1 modules) +oid = univ.ObjectIdentifier((1, 2, 840, 113549, 1, 1, 1)) +assert str(oid) == '1.2.840.113549.1.1.1' + +# Verify key RFC modules are importable and have expected attributes +assert hasattr(rfc2459, 'Certificate') +assert hasattr(rfc5280, 'Certificate') +assert hasattr(rfc2986, 'CertificationRequest') + +print("pyasn1-modules OK") +EOF