# -*- 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-wreq
version             0.12.1
revision            0
categories-append   net
homepage            https://python.wreq.org/
license             Apache-2 
maintainers         {i0ntempest @i0ntempest} openmaintainer

description         an ergonomic, censorship-resistant Python HTTP Client
long_description    ${name} is an ergonomic and modular Python HTTP Client for high-fidelity protocol matching,\
                    featuring customizable TLS, JA3/JA4, and HTTP/2 signature capabilities.

checksums           rmd160  c246ab7c21780c3c52e818c30252145d6549aa04 \
                    sha256  f3cff9792b489d6f3b9e333e3ea76a067b648b5146b8326b3a2c99af7a089639 \
                    size    198922

python.versions     313 314
python.pep517_backend \
                    maturin

if {${name} ne ${subport}} {
    depends_build-append \
                    port:cmake

    if {${os.major} >= 27} {
        # do not strip on macOS 27 for now
        # see https://github.com/BTMuli/TeyvatGuide/pull/251 and https://github.com/rust-lang/rust/issues/157750
        post-patch {
            reinplace "s|strip = true|strip = \"none\"|g" Cargo.toml
        }
    }
}
