# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           python 1.0

name                py-asn1-modules
python.rootname     pyasn1-modules
version             0.3.0
revision            0

categories-append   devel crypto
platforms           {darwin any}
supported_archs     noarch
license             BSD
maintainers         nomaintainer

description         A collection of ASN.1-based protocols modules.
long_description    This is a small but growing collection of ASN.1 \
                    data structures expressed in Python terms using pyasn1 data model.

homepage            https://github.com/etingof/pyasn1-modules

distname            pyasn1_modules-${version}

checksums           rmd160  33092910bbb0a86b264e0501c00530c6882e72ca \
                    sha256  5bd01446b736eb9d31512a30d46c1ac3395d676c6f3cafa4c03eb54b9925631c \
                    size    307901

python.versions     27 37 38 39 310 311

if {${name} ne ${subport}} {
    depends_build-append \
                    port:py${python.version}-setuptools

    depends_lib-append \
                    port:py${python.version}-asn1

    post-destroot {
        xinstall -d ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 644 -W ${worksrcpath} CHANGES.txt LICENSE.txt README.md \
            ${destroot}${prefix}/share/doc/${subport}
    }

    if {${python.version} eq 27} {
        depends_test-append \
                    port:py${python.version}-unittest2
    }

    test.run        yes
    python.test_framework unittest
}
