# -*- 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-testfixtures
version             8.3.0
revision            1

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

python.versions     39 310 311 312 313

maintainers         {khindenburg @kurthindenburg} openmaintainer

description         A collection of helpers and mock objects for tests
long_description    {*}${description}

homepage            https://pypi.python.org/pypi/${python.rootname}/

checksums           rmd160  61b47d01e86664783e4ebb930f6027e0fd84922b \
                    sha256  d4c0b84af2f267610f908009b50d6f983a4e58ade22c67bab6787b5a402d59c0 \
                    size    137420

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

    post-extract {
        copy -force ${filespath}/conftest.py ${worksrcpath}/testfixtures/tests/
        # Ignore django tests for now and ignore this warning
        #  PytestConfigWarning: Unknown config option: DJANGO_SETTINGS_MODULE
        delete ${worksrcpath}/testfixtures/tests/test_django
    }

    depends_test-append port:py${python.version}-service_identity \
                        port:py${python.version}-sybil \
                        port:py${python.version}-twisted \
                        port:py${python.version}-zope-component

    test.run            yes
    # PY_IGNORE_IMPORTMISMATCH to ignore _pytest.pathlib.ImportPathMismatchError
    test.env-append     PY_IGNORE_IMPORTMISMATCH=1
}
