# -*- 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     27 39 310 311 312 313
python.pep517       no

if {${name} ne ${subport}} {
    if {${python.version} == 27} {
        github.setup    Unidata cftime 1.5.2 v rel
        revision        0
        epoch           1
        checksums       rmd160  acd812fb21765ecf044d68c186ac39e83ffe0a92 \
                        sha256  86e1ec04135828f0c8a4e4ac4b9baff08f8b57d0b1f31662dbf0209fdcc63a2d \
                        size    580452
    }

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

    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}
    }

    livecheck.type  none
}
