# -*- 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-urllib3
version             2.6.3
revision            0
categories-append   devel net
platforms           {darwin any}
supported_archs     noarch
license             MIT

python.versions     27 36 310 311 312 313 314
python.pep517_backend \
                    hatch

maintainers         {stromnov @stromnov} openmaintainer

description         HTTP library with thread-safe connection pooling, file post, and more.
long_description    ${description}

homepage            https://urllib3.readthedocs.io/

checksums           rmd160  5836969365bae1963fccd163f0f6c60cd0527094 \
                    sha256  1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed \
                    size    435556

if {${name} ne ${subport}} {
    if {${python.version} > 312} {
        conflicts   py${python.version}-urllib3-future
    }

    depends_build-append \
                        port:py${python.version}-hatch-vcs
    depends_lib-append  port:py${python.version}-certifi

    if {${python.version} <= 37} {
        version             1.26.18
        revision            0
        python.pep517_backend \
                            setuptools
        checksums           rmd160  247563ce0f574a1bc5efe229baebd1ce5a041042 \
                            sha256  f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0 \
                            size    305687

        depends_build-delete \
                            port:py${python.version}-hatch-vcs

        if {${python.version} < 37} {
            python.pep517       no
            depends_build-append \
                                port:py${python.version}-setuptools
        }

        if {${python.version} eq 27} {
            depends_lib-append  port:py${python.version}-ipaddress
        }
    }

    livecheck.type      none
}
