# -*- 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.24.2
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  845e969fdc66b19dbb33474eb0dc7319e20b137b \
                    sha256  c22803117490f156e59fafce621f0550a7a853e2bbf4f87f112b11d469b6c81b \
                    size    37601

# keep version for Python 2.7, this is an (indirect) dependencies of py-virtualenv
# See: <https://trac.macports.org/wiki/Python#VersionPolicy>
python.versions     27 39 310 311 312 313 314

if {${name} ne ${subport}} {
    if {${python.version} == 27} {
        version     3.2.1
        revision    0
        epoch       1

        checksums   rmd160  4438a50fb193ec08f29631a5fbc657a74b5a084d \
                    sha256  9cdd29c411ab196cf4c35a1da684f7b9da723696cb356efa45bf5eb1ff313ee3 \
                    size    202950

        depends_build-append \
                    port:py${python.version}-setuptools_scm \
                    port:py${python.version}-toml
    } else {
        python.pep517_backend hatch

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

        test.run    yes
        test.env-append PYTHONPATH=${destroot}${python.pkgd}

        depends_test-append \
                        port:py${python.version}-pytest-asyncio \
                        port:py${python.version}-pytest-mock \
                        port:py${python.version}-pytest-timeout \
                        port:py${python.version}-virtualenv
    }

    livecheck.type  none
}
