# -*- 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.8.0
revision            0

platforms           {darwin any}
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  73be21c1e144f3d177883745ba683df4df556f00 \
                    sha256  55447caa666f2198c5b6b13a26d2084d26fa5b115c00d065664b2124680c4edc \
                    size    207618

# 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} == 36} {
        version     3.4.1
        revision    0

        checksums   rmd160  4df725914d2d3943b8ebabc699695ab1a6da700d \
                    sha256  0f12f552b42b5bf60dba233710bf71337d35494fc8bdd4fd6d9f6d082ad45e06 \
                    size    206768
    }

    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
}
