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

github.setup        spulec freezegun 1.5.1
github.tarball_from archive
name                py-freezegun
revision            0

categories-append   devel
platforms           {darwin any}
supported_archs     noarch
license             Apache-2
maintainers         nomaintainer

description         FreezeGun is a library that allows your python tests \
                    to travel through time by mocking the datetime module.
long_description    {*}${description}

checksums           rmd160  bc315045eba40eec81a43ec3d807b74eb73e1612 \
                    sha256  8758cac200d23c4e498c694d79f040f8ffe54bcb2eb3aafdcb7320036fefabc8 \
                    size    31309

python.versions     27 35 36 37 38 39 310 311 312 313 314

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

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

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

    # 0.3.5 is the latest version for Python 2.7
    if {${python.version} == 27} {
        github.setup        spulec freezegun 0.3.15
        revision            0

        checksums           rmd160  4f58e0cba6024acfb89a68236da5857ebbe772e8 \
                            sha256  e1e1ec9c1227a2411ab3f5c5775e452a91cbf74a60830d60ac440de133617f84 \
                            size    23874
    } elseif {${python.version} < 37} {
        github.setup        spulec freezegun 1.1.0
        github.tarball_from archive
        revision            0
        checksums           rmd160  fe7a03df9a03ed58f602150d6a9fd0a89fad02fb \
                            sha256  3bd449003f847ec97b3ebcae8e3439c56f3faf75ebf29c11e886c30aead5ed29 \
                            size    25977
    }

    test.run                yes

    livecheck.type  none
}
