# -*- 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-tz
python.rootname     pytz
version             2021.1
revision            0

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

description         World Timezone Definitions for Python
long_description    pytz brings the Olson tz database into Python. This library allows \
                    accurate and cross platform timezone calculations.

homepage            https://pypi.python.org/pypi/pytz

checksums           rmd160  1f7dba08d6ac28c013057666491d2219d82898b0 \
                    sha256  83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da \
                    size    317945

python.versions     27 35 36 37 38 39

if {${name} ne ${subport}} {
    if {${python.version} in "27 35 36"} {
        conflicts   py${python.version}-tz-gae
    }

    test.run        yes
    test.dir        ${build.dir}/pytz/tests
    test.cmd        ${python.bin} test_lazy.py && ${python.bin} test_tzinfo.py
    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 LICENSE.txt README.rst \
            ${destroot}${docdir}
    }

    livecheck.type  none
}
