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

python.versions     27 36 37 38 39 310 311 312 313
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  ea97bcf8e7dc357eaa4905e5b858d1d2a0d37b58 \
                    sha256  55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760 \
                    size    131218

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
    } elseif {${python.version} eq 37} {
        version             2.31.0
        revision            0
        checksums           rmd160  9551427d31e6cc38152de25d4270c92da1cf8808 \
                            sha256  942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1 \
                            size    110794
    }

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

    livecheck.type      none
}