# -*- 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-eventlet
version             0.40.3
revision            0

categories-append   devel
license             MIT
maintainers         {mps @Schamschula} openmaintainer

description         Highly concurrent networking library
long_description    Eventlet is a networking library written in \
                    Python. It achieves high scalability by using \
                    non-blocking io while at the same time \
                    retaining high programmer usability by using \
                    coroutines to make the non-blocking io \
                    operations appear blocking at the source code \
                    level.
homepage            https://eventlet.net/

supported_archs     noarch
platforms           {darwin any}

checksums           rmd160  fd205638501282937c2166e6269efefee018d383 \
                    sha256  290852db0065d78cec17a821b78c8a51cafb820a792796a354592ae4d5fceeb0 \
                    size    565741

python.versions     39 310 311 312 313

python.pep517_backend \
                    hatch

if {${name} ne ${subport}} {
    depends_build-append \
                    port:py${python.version}-hatch-vcs

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

    post-destroot {
        xinstall -d ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 0644 -W ${worksrcpath} AUTHORS LICENSE NEWS \
           README.rst ${destroot}${prefix}/share/doc/${subport}
    }

    test.run        yes
    python.test_framework nose
    # The normal testing has too many missing deps
    test.cmd        nosetests-${python.branch} tests/timer_test.py
}
