# -*- 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-pyicu
version             2.4.2
revision            0

categories-append   textproc
platforms           darwin
license             MIT
maintainers         nomaintainer

description         Python extension wrapping the ICU C++ API
long_description    ${description}

homepage            https://github.com/ovalhub/pyicu
master_sites        pypi:P/PyICU/
distname            PyICU-${version}

checksums           rmd160  2c90fa71134b70f51c636a47b900108412c2e2b4 \
                    sha256  48c43424b67090c4028d8743132d141d8477f390f93e26c2cb67c26485622c20 \
                    size    219356

python.versions     27 34 35 36 37 38

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

    depends_lib-append  port:icu

    # icu requires C++11
    compiler.cxx_standard 2011

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

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

    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} LICENSE CREDITS \
            README.md CHANGES ${destroot}${docdir}
    }

    livecheck.type      none
} else {
    livecheck.name      PyICU
}