# -*- 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-requests
version             2.33.1
revision            0
categories-append   devel
license             Apache-2
supported_archs     noarch
platforms           {darwin any}

python.versions     27 36 310 311 312 313 314

maintainers         {stromnov @stromnov} openmaintainer

description         Python HTTP for Humans.

long_description    Most existing Python modules for dealing HTTP \
                    requests are insane. I have to look up everything \
                    that I want to do. Most of my worst Python \
                    experiences are a result of the various built-in \
                    HTTP libraries (yes, even worse than Logging). But \
                    this one's different. This one's going to be \
                    awesome. And simple. Really simple.

homepage            https://requests.readthedocs.io/

checksums           rmd160  2051438db5a98dc7067cb2eb694e57515b483968 \
                    sha256  18817f8c57c6263968bc123d237e3b8b08ac046f5456bd1e307ee8f4250d3517 \
                    size    134120

if {${name} ne ${subport}} {

    depends_lib-append  port:py${python.version}-charset-normalizer \
                        port:py${python.version}-idna \
                        path:${python.pkgd}/urllib3/__init__.py:py${python.version}-urllib3 \
                        port:py${python.version}-certifi

    if {${python.version} < 37} {
        version             2.27.1
        revision            0
        checksums           rmd160  4bcd04983842ddce16afbfa83bfd042ba7e7a468 \
                            sha256  68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61 \
                            size    106758
        python.pep517       no
        depends_build-append \
                            port:py${python.version}-setuptools
    }

    if {${python.version} <= 35} {
        depends_lib-replace \
                            port:py${python.version}-charset-normalizer \
                            port:py${python.version}-chardet
    }

    livecheck.type      none
}
