# -*- 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-parsedatetime
version             2.6
revision            0

platforms           darwin
supported_archs     noarch
license             Apache-2
maintainers         nomaintainer

description         Parse human-readable date/time text
long_description    {*}${description}
homepage            https://github.com/bear/parsedatetime

checksums           rmd160  8f1586e283a4a85653a8998ed507f36b7118b92a \
                    sha256  4cb368fbb18a0b7231f4d76119165451c8d2e35951455dfee97c62a87b04d455 \
                    size    60114

python.versions     27 35 36 37 38 39 310

if {${name} ne ${subport}} {
    if {${python.version} == 27} {
        # see https://github.com/bear/parsedatetime/issues/246
        version     2.5
        revision    0
        epoch       1
        master_sites macports_distfiles
        checksums   rmd160  026f941e2038fda3a5dc41b3f70956d01a68eaa5 \
                    sha256  62ca1211c74f571790c49b527ee11fd2000a9195e23d866e22141105ed7b1558 \
                    size    63971
    }

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

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

    test.run        yes
    test.cmd        py.test-${python.branch}
    test.target
    test.env        PYTHONPATH=${worksrcpath}/build/lib

    livecheck.type  none
}
