# -*- 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-itemadapter
version             0.13.1
revision            0
maintainers         {khindenburg @kurthindenburg} openmaintainer
platforms           {darwin any}
license             BSD
supported_archs     noarch

description         Common interface for data container classes
long_description    The `ItemAdapter` class is a wrapper for data \
                    container objects, providing a common interface \
                    to handle objects of different types in an uniform \
                    manner, regardless of their underlying implementation.

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

checksums           rmd160  30b8bf349ed82c3c582136eeed95a1445cd1321d \
                    sha256  fa139c7be2aa80f8874b2f23d165d5d4aa47c4b85c54ab530b567fd5f684f1b4 \
                    size    32343

python.pep517_backend   hatch

python.versions     310 311 312 313 314

if {${name} ne ${subport}} {
    if {${python.version} == 310} {
        version         0.12.2
        revision        0

        checksums       rmd160  42bf5620130e3fe6c4e3041572ff75ef511aeba9 \
                        sha256  8e05c07cea966a7a8c4f096150ee2c91d9b4104a76f9afd029b235e1b564a61f \
                        size    32089
        livecheck.type  none
    }

    # Match py-scrapy versions
    if {${python.version} >= 310 && ${python.version} < 313} {
        test.run            yes
        # Note the dependency loop for py-scrapy and py-itemadapter
        depends_test-append port:py${python.version}-pytest \
                            port:py${python.version}-scrapy
    }
}
