# -*- 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
PortGroup           github 1.0

github.setup        facebook pyre2 1.0.7 v
revision            0
name                py-re2
categories-append   devel
license             BSD
platforms           darwin
maintainers         nomaintainer

description         Python wrapper of Google's RE2 library.
long_description    pyre2 is a Python extension that wraps Google's RE2 regular \
                    expression library. It implements many of the features of \
                    Python's built-in re module with compatible interfaces.

checksums           rmd160  8d370f3855fd0daacb35880e26db284acc64fc77 \
                    sha256  236ed6f80d9db39888d5cc2abde5ca62d89e13a0f7ebdee24e371b4ddb29cc12 \
                    size    11685

python.versions     27 37

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

    depends_lib-append \
                    port:re2

    compiler.cxx_standard   2011

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

    pre-test {
        test.env    PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*]
    }
    test.run        yes
    test.cmd        ${python.bin} setup.py

    livecheck.type  none
}
