# -*- 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-flufl.lock
version             6.0
revision            0

categories-append   devel
supported_archs     noarch
platforms           {darwin any}
license             Apache-2

python.versions     39

maintainers         nomaintainer

description         NFS-safe file locking with timeouts for POSIX and Windows.
long_description    {*}${description} The flufl.lock library provides \
                    an NFS-safe file-based locking algorithm \
                    influenced by the GNU/Linux open(2) manpage, under \
                    the description of the O_EXCL option.

homepage            https://flufllock.readthedocs.io/

checksums           rmd160  3040a52ce70ff9720530caa6fb6d9cf4d1ae7670 \
                    sha256  fc748ee609ec864b4838ef649dbd1170fa79deb0c213c2fd51151bee6a7fc242 \
                    size    30762

if {${name} ne ${subport}} {
    depends_run-append \
                    port:py${python.version}-atpublic \
                    port:py${python.version}-psutil \
                    port:py${python.version}-typing_extensions

    post-extract {
        # https://github.com/pytest-dev/pytest/issues/2290
        delete ${worksrcpath}/test/__init__.py
    }

    test.run        yes
}
