# -*- 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.0
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  a937b3a3f9da0de6e32c920cb419b37003d8f5a2 \
                    sha256  66ec6aa9b67264ea680606fa826ccdb1fbe85366a71d47f5d4325b74eee185c9 \
                    size    252847

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
        }
    }
}
