# -*- 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             10.0.0
revision            1

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

python.versions     310 311 312 313 314

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  38dbc1380de8dac4a8fbd24d82628e9bfebe1012 \
                    sha256  2b9829bf7f42f0ca8600250762e6725575da59af18d9a7f82aae2c97b14f0f66 \
                    size    147464

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

    post-extract {
        # If you comment out the below, a lot more tests are ran but there
        # are a lot of errors
        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

    if {${python.version} < 311} {
        version         8.3.0
        revision        1

        checksums           rmd160  61b47d01e86664783e4ebb930f6027e0fd84922b \
                            sha256  d4c0b84af2f267610f908009b50d6f983a4e58ade22c67bab6787b5a402d59c0 \
                            size    137420

        livecheck.type      none
    }
}
