# -*- 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             2026.5
revision            0

categories-append   devel
supported_archs     noarch
platforms           {darwin any}
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  d4c3024364a09f543eb6aa6cfc06c29fc1cee111 \
                    sha256  fa23724b9c486543b9ff54a327ee7569ac83ade54bb9afd0fc18676620401c86 \
                    size    318572

python.versions     27 310 311 312 313 314 315

if {${name} ne ${subport}} {
    if {${python.version} == 27} {
        conflicts   py${python.version}-tz-gae
    }

    test.run        yes
    python.test_framework
    test.dir        ${build.dir}/pytz/tests
    test.cmd        ${python.bin} test_lazy.py && ${python.bin} test_tzinfo.py

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