Files
packages/lang/python/python-pyasn1-modules/test.sh
Alexandru Ardelean c0213d52af 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 <alex@shruggie.ro>
2026-04-09 08:01:05 +03:00

21 lines
625 B
Bash

#!/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