# -*- 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.5
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  3262bd3848b7b066602312df284055e7c158c4ce \
                    sha256  0ca33d089042f5438afcad48e77415959893d3e82fc2ef94199f0c25431a3540 \
                    size    33302

python.versions     27 310 311 312 313 314 315

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

        # This used to come from github.tarball_from release, but it’s no longer
        # available from there. github.tarball_from archive expands to identical
        # content, but the tarball has a different hash.
        dist_subdir         ${name}/${version}_github_archive
        checksums           rmd160  0dc539b08f7ee219e76a5697f04b7d2ea0bb3bc1 \
                            sha256  044b4467469098c19d0efa7f42ed627caab8b8ad1901d70e6b42a5a474db5a42 \
                            size    23868
    }

    test.run                yes

    livecheck.type  none
}
