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

python.versions     27 35 36 37 38 39 310
python.pep517       yes

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  ed0fccd3aa2f726c7f96137cef3c227e2789f8a4 \
                    sha256  7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983 \
                    size    109805

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

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

    if {${python.version} == 35} {
        version             2.25.1
        epoch               1
        revision            0
        checksums           rmd160  4a8a60da9b3619a53bd5a74245e58123702ae7e6 \
                            sha256  27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804 \
                            size    102161
        python.pep517       no
        depends_build-append \
                            port:py${python.version}-setuptools
    } elseif {${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
}
