# -*- 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.3
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  31a19145a4934aa4f3a4aff077130028a2c980da \
                    sha256  011a5644dc937c22699943ebbfc46e969cdde3e171470a6e40b9533e5a72affa \
                    size    37935

# 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
    } elseif {${python.version} == 39} {
        version     3.19.1
        revision    0
        epoch       1

        checksums   rmd160  4438a50fb193ec08f29631a5fbc657a74b5a084d \
                    sha256  9cdd29c411ab196cf4c35a1da684f7b9da723696cb356efa45bf5eb1ff313ee3 \
                    size    202950

        python.pep517_backend hatch

        depends_build-append \
                    port:py${python.version}-hatch-vcs
    } 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
}
