# -*- 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-tempora
version             5.8.0
revision            0

categories-append   devel
supported_archs     noarch
platforms           {darwin any}
license             MIT

maintainers         {khindenburg @kurthindenburg} openmaintainer

description         Objects and routines pertaining to date and time (tempora)
long_description    {*}${description}

homepage            https://pypi.python.org/pypi/${python.rootname}

checksums           rmd160  111c2ced643282bdecdeb9a32dc3da0226f63f43 \
                    sha256  1e9606e65a3f2063460961d68515dee07bdaca0859305a8d3e6604168175fef1 \
                    size    23019

python.versions     38 39 310 311 312 313

if {${name} ne ${subport}} {
    depends_build-append    port:py${python.version}-setuptools_scm
    depends_lib-append      port:py${python.version}-jaraco.functools \
                            port:py${python.version}-setuptools \
                            port:py${python.version}-six \
                            port:py${python.version}-toml

    # Still needed for now due to dependencies
    if {${python.version} <= 38} {
        version             5.7.0
        revision            0

        checksums           rmd160  da0c8e335fa2c1f2634b2a0168450bef1f29fccd \
                            sha256  888190a2dbe3255ff26dfa9fcecb25f4d38434c0f1943cd61de98bb41c410c50 \
                            size    22239

        patchfiles          patch-fix-compat.diff
    }

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

    test.run            yes
}
