# -*- 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-mock
version             3.15.1
revision            0

categories-append   devel
license             MIT
maintainers         nomaintainer
platforms           {darwin any}
supported_archs     noarch

description         Thin-wrapper around the mock package for easier use with \
                    py.test
long_description    {*}${description}. This plugin installs a mocker \
                    fixture which is a thin-wrapper around the \
                    patching API provided by the mock package, but \
                    with the benefit of not having to worry about \
                    undoing patches at the end of a test.

homepage            https://github.com/pytest-dev/pytest-mock/

distname            pytest_mock-${version}

checksums           rmd160  7d4b304358bd5c95b1fcd5b0f633ec04abb732a7 \
                    sha256  1849a238f6f396da19762269de72cb1814ab44416fa73a8686deac10b0d87a0f \
                    size    34036

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}-mock \
                    port:py${python.version}-pytest

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

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

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