# -*- 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-latexcodec
version             2.0.1
revision            0

categories-append   textproc
platforms           darwin
supported_archs     noarch
license             MIT
maintainers         nomaintainer

description         A lexer and codec to work with LaTeX code in Python.
long_description    ${description}

homepage            https://github.com/mcmtroffaes/latexcodec

checksums           rmd160  1377a011dec78d845135ca83f2444e8ffb2fcc0b \
                    sha256  2aa2551c373261cefe2ad3a8953a6d6533e68238d180eb4bb91d7964adb3fe9a \
                    size    30131

python.versions     27 36 37 38 39

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

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

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

    test.run            yes
    test.cmd            py.test-${python.branch}
    test.target
    test.env            PYTHONPATH=${worksrcpath}/build/lib

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

    livecheck.type      none
}
