# -*- 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-gevent
version             24.2.1
revision            0
categories-append   devel
platforms           darwin
license             MIT
supported_archs     i386 x86_64 arm64

python.versions     37 38 39 310 311 312
python.pep517       yes

maintainers         {stromnov @stromnov} openmaintainer

description         Coroutine-based Python networking library.

long_description    gevent is a coroutine-based Python networking \
                    library that uses greenlet to provide a high-level \
                    synchronous API on top of libevent event loop.

homepage            http://gevent.org

checksums           rmd160  b6afc482b78e008b8ce6593ab58bd63dc82d70e9 \
                    sha256  432fc76f680acf7cf188c2ee0f5d3ab73b63c1f03114c7cd8a34cebbe5aa2056 \
                    size    6147507

if {${name} ne ${subport}} {
    depends_build-append \
                        port:py${python.version}-cython
    depends_lib-append  port:py${python.version}-greenlet \
                        port:py${python.version}-cffi \
                        port:py${python.version}-zope-event \
                        port:py${python.version}-zopeinterface

    if {${python.version} eq 37} {
        version             22.10.2
        revision            0
        distname            ${python.rootname}-${version}
        checksums           rmd160  4f250b9af95ee094fb2bb54a7f77c3a68d99f89c \
                            sha256  1ca01da176ee37b3527a2702f7d40dbc9ffb8cfc7be5a03bfa4f9eec45e55c46 \
                            size    6551607
        python.pep517       no

        build.env-append    GEVENTSETUP_EMBED=0
        destroot.env-append GEVENTSETUP_EMBED=0

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

    livecheck.type      none
}
