# -*- 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.2.8
revision            0

categories-append   devel crypto
platforms           darwin
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

checksums           rmd160  754acffd8efd815b79b0f9b2190ee1672aede4b5 \
                    sha256  905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e \
                    size    242864

python.versions     27 35 36 37 38 39

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
    test.cmd        ${python.bin} tests/__main__.py
    test.target
    test.env        PYTHONPATH=${worksrcpath}:${worksrcpath}/build/lib

    livecheck.type  none
}
