# -*- 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-pytest-datadir
python.rootname     pytest_datadir
version             1.8.0
revision            0

categories-append   devel
supported_archs     noarch
platforms           {darwin any}
license             MIT
maintainers         {judaew @judaew} openmaintainer

description         \
    pytest plugin for manipulating test data directories and files.
long_description    {*}${description}

homepage            https://github.com/gabrielcnr/pytest-datadir

checksums           rmd160  55590cf01e1b1af9003058568254b12c832aab76 \
                    sha256  7a15faed76cebe87cc91941dd1920a9a38eba56a09c11e9ddf1434d28a0f78eb \
                    size    11848

python.versions     310 311 312 313 314

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

    depends_run-append \
                    port:py${python.version}-pytest

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README.md LICENSE \
            ${destroot}${docdir}

        file delete -force ${destroot}/${python.prefix}/LICENSE
    }
}
