# -*- 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

# Don't forget to update the httpcore2 version in the patch file
name                py-httpx2
version             2.6.0
revision            0

license             BSD
maintainers         {mps @Schamschula} openmaintainer
description         HTTPX2 is a fully featured HTTP client library for Python.
long_description    {*}${description} It includes an integrated command line client, \
                    has support for both HTTP/1.1 and HTTP/2, and provides both sync and async APIs.
homepage            https://github.com/pydantic/httpx2

checksums           rmd160  1e5bce59c2328a43be6d81ea92583368dc17c6bb \
                    sha256  5d362fd59562cf2139a60c67bb016587a70b36156a517f176c7cbf1587d1ab22 \
                    size    92736

python.versions     310 311 312 313 314

python.pep517_backend \
                    hatchling

if {${name} ne ${subport}} {
    depends_build-append  \
                    port:py${python.version}-hatch-fancy-pypi-readme \
                    port:py${python.version}-uv-dynamic-versioning

    depends_lib-append  \
                    port:py${python.version}-anyio \
                    port:py${python.version}-httpcore2 \
                    port:py${python.version}-idna \
                    port:py${python.version}-truststore

    if {${python.version} <= 312} {
        depends_lib-append  \
                    port:py${python.version}-typing_extensions
    }

    patchfiles      patch-httpcore2.diff
}
