# -*- 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-h2
version             4.4.1
revision            0

categories-append   net www
supported_archs     noarch
platforms           {darwin any}
license             MIT
maintainers         {petr @petrrr} openmaintainer

description         Hyper-h2: A pure-Python HTTP/2 protocol stack
long_description    \
    Hyper-h2 is a HTTP/2 protocol stack, written entirely in Python. \
    The goal of Hyper-h2 is to be a 100% RFC 7540 compatible implementation \
    of a complete HTTP/2 protocol stack for the Python ecosystem, build on a \
    set of finite state machines. It should be usable in all programs \
    regardless of concurrency model or environment. To achieve this, Hyper-h2 \
    is entirely self-contained: it does no I/O of any kind, leaving that up \
    to a wrapper library to control. This ensures that it can seamlessly work \
    in all kinds of environments, from single-threaded code to Twisted. Its \
    secondary goals are to be fast, clear, and efficient.

homepage            https://python-hyper.org/projects/${python.rootname}/

checksums           rmd160  6b35ecdc23243f3e0809ddebfa98adefdb364b50 \
                    sha256  4e866ffb1a869ae14dd9b5e6beb5c24a13da0495ad72b65925ded182521c1516 \
                    size    2157281

python.versions     310 311 312 313 314

if {${name} ne ${subport}} {
    patchfiles      patch-pyproject.toml.diff

    depends_lib-append \
                    port:py${python.version}-hpack \
                    port:py${python.version}-hyperframe

    test.run        yes

    depends_lib-append \
                    port:py${python.version}-hypothesis
}
