# -*- 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-typed-ast
version             1.4.2
revision            0

categories-append   devel
platforms           darwin
license             Apache-2
maintainers         {reneeotten @reneeotten} openmaintainer

description         A fork of Python 2 and 3 ast modules with type comment support.
long_description    ${description}

homepage            https://github.com/python/typed_ast
distname            typed_ast-${version}

checksums           rmd160  583e28d8d92c7fe48934b179b4bd7d385a4b237e \
                    sha256  9fc0b3cb5d1720e7141d103cf4819aea239f7d136acf9ee4a69b047b7986175a \
                    size    208583

python.versions     35 36 37 38 39

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

    depends_test-append \
                    port:py${python.version}-pytest

    pre-test {
        test.env    PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*]
    }

    test.run        yes
    test.cmd        py.test-${python.branch}
    test.target

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README.md LICENSE \
          ${destroot}${docdir}
       }

    livecheck.type  none
}
