# -*- 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-tzlocal
version             2.1
revision            0
platforms           darwin
license             MIT
supported_archs     noarch

maintainers         nomaintainer

description         tzinfo object for the local timezone
long_description    This Python module returns a tzinfo object with the local \
                    timezone information under Unix and Win-32. It requires \
                    pytz, and returns pytz tzinfo objects.

homepage            https://github.com/regebro/tzlocal

checksums           rmd160  19f7979e221659e3f90300656e01f483733433c1 \
                    sha256  643c97c5294aedc737780a49d9df30889321cbe1204eac2c2ec6134035a92e44 \
                    size    22462

python.versions     27 36 37 38 39

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

    depends_lib-append \
                    port:py${python.version}-tz

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

    test.run        yes
    test.cmd        ${python.bin} setup.py
    test.env        PYTHONPATH=${worksrcpath}/build/lib

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

    livecheck.type  none
}
