# -*- 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-country
python.rootname     pycountry
version             18.12.8
revision            0
license             LGPL-2.1
platforms           darwin
supported_archs     noarch
maintainers         nomaintainer
description         ISO country, subdivision, language, currency and script definitions and their translations
long_description    ${description}

homepage            https://bitbucket.org/flyingcircus/pycountry
master_sites        pypi:p/pycountry
distname            pycountry-${version}

checksums           rmd160  1aef86ce0594ec4f5b5f87cc56cf6c9e8c2be171 \
                    sha256  8ec4020b2b15cd410893d573820d42ee12fe50365332e58c0975c953b60a16de \
                    size    10026953

python.versions     27 35 36 37

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

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

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

    post-destroot {
        xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 0644 -W ${worksrcpath} TODO.txt README LICENSE.txt \
            HISTORY.txt ${destroot}${prefix}/share/doc/${subport}
    }

    livecheck.type      none
}