# -*- 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
PortGroup           github 1.0

github.setup        Unidata cftime 1.6.4.post1 v rel
github.tarball_from archive
name                py-cftime
revision            0

categories-append   devel
license             MIT
maintainers         {reneeotten @reneeotten} openmaintainer

description         Time-handling functionality from netcdf4-python
long_description    {*}${description}

checksums           rmd160  efcf3fa122f0e6844298cbcb8d932eb15ac58b66 \
                    sha256  aaca6a88f970cdb20be9383b84a4fb9c52545eba460635469dfd815075fadd94 \
                    size    61825

python.versions     39 310 311 312 313

if {${name} ne ${subport}} {
    patchfiles      patch-numpy-pyproject.toml.diff

    depends_build-append \
                    port:py${python.version}-cython \
                    port:py${python.version}-oldest-supported-numpy

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

    test.run        yes

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