# -*- 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             2025.2
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  b5ff2c564fd3fd5845884b012c00ff2b07ec8980 \
                    sha256  360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3 \
                    size    320884

python.versions     27 35 36 37 38 39 310 311 312 313 314

if {${name} ne ${subport}} {
    if {${python.version} in "27 35 36"} {
        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}
    }
}
