# -*- 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-trio
version             0.17.0
categories-append   devel
platforms           darwin
supported_archs     noarch
license             {Apache-2 MIT}

python.versions     36 37 38 39

maintainers         {@jandemter demter.de:jan} openmaintainer

description         Friendly Python library for async concurrency and I/O
long_description    The Trio project's goal is to produce a \
                    production-quality, permissively licensed, \
                    async/await-native I/O library for Python. Like all \
                    async libraries, its main purpose is to help you write \
                    programs that do multiple things at the same time with \
                    parallelized I/O.

homepage            https://github.com/python-trio/trio/
master_sites        pypi:t/trio

distname            trio-${version}

checksums           rmd160  96713c61a7200c147359d6acd2127fb45719f66d \
                    sha256  e85cf9858e445465dfbb0e3fdf36efe92082d2df87bfe9d62585eedd6e8e9d7d \
                    size    439265

if {${name} ne ${subport}} {
    depends_build-append    port:py${python.version}-setuptools
    depends_run-append      port:py${python.version}-sortedcontainers \
                            port:py${python.version}-async_generator \
                            port:py${python.version}-attrs \
                            port:py${python.version}-idna \
                            port:py${python.version}-outcome \
                            port:py${python.version}-sniffio
    depends_test-append     port:py${python.version}-astor \
                            port:py${python.version}-openssl \
                            port:py${python.version}-black \
                            port:py${python.version}-trustme \
                            port:py${python.version}-jedi \
                            port:py${python.version}-pylint \
                            port:py${python.version}-pytest

    if {${python.version} < 37} {
        depends_lib-append  port:py${python.version}-contextvars
    }

    test.run            yes
    test.cmd            py.test-${python.branch} -m 'not redistributors_should_skip' \
                        --deselect trio/_core/tests/test_asyncgen.py::test_fallback_when_no_hook_claims_it
    test.target
    test.env            PYTHONPATH=${worksrcpath}/build/lib

    livecheck.type      none
}
