# -*- 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             1.0.6
revision            0
categories-append   textproc
platforms           darwin
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
master_sites        pypi:l/latexcodec
distname            latexcodec-${version}

checksums           rmd160  7d3eb7df5d79639df55e16e93df7b516e45cafa7 \
                    sha256  01ad6b8d99606bb902f94269d6a14597000d220885781087bc880a0ede6a9c68 \
                    size    26756

python.versions     27 36 37

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}-nose
    test.run            yes
    test.cmd            nosetests-${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
}