# -*- 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-filelock
version             3.4.0
revision            0

platforms           darwin
supported_archs     noarch
license             public-domain
maintainers         {@funasoul gmail.com:funasoul} openmaintainer

description         A platform independent file lock
long_description    This package contains a single module, which implements \
                    a platform independent file lock in Python, which \
                    provides a simple way of inter-process communication:

homepage            https://py-filelock.readthedocs.io/

checksums           rmd160  9d2213165c6dfc44a0652124fb8a74ee2bd3ac5b \
                    sha256  93d512b32a23baf4cac44ffd72ccf70732aeff7b8050fcaf6d3ec406d954baf4 \
                    size    206359

# keep version for PY27 and PY34, these are (indirect) dependencies of py-virtualenv
python.versions     27 34 35 36 37 38 39 310

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

    if {${python.version} <= 35} {
        version     3.2.1
        revision    0
        epoch       1

        checksums   rmd160  4438a50fb193ec08f29631a5fbc657a74b5a084d \
                    sha256  9cdd29c411ab196cf4c35a1da684f7b9da723696cb356efa45bf5eb1ff313ee3 \
                    size    202950

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

    }

    if {${python.version} ni "34"} {
        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
}
