# -*- 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           github 1.0
PortGroup           python 1.0

github.setup        graphql-python graphql-relay-py 3.2.0 v
revision            0
name                py-[strsed ${github.project} {s|-py$||}]
categories-append   devel

license             MIT
maintainers         nomaintainer
supported_archs     noarch

description         Relay library for graphql-core.
long_description    GraphQL-relay-py is the Relay library for \
                    GraphQL-core. It allows the easy creation of \
                    Relay-compliant servers using GraphQL-core.

checksums           rmd160  8aaf7b796bc0103b7cca0c9d08f54a75d4281bda \
                    sha256  5fc4c87525941bd408a532ccbd0c2033694450ec1c65b55cc71eeb9866b2ae40 \
                    size    44907

python.versions     37 38 39 310
python.pep517       yes
python.pep517_backend poetry

if {${name} ne ${subport}} {
    depends_lib-append \
                    port:py${python.version}-setuptools

    depends_run-append \
                    port:py${python.version}-graphql-core \


    if {${python.version} < 38} {
        depends_run-append \
                    port:py${python.version}-typing_extensions
    }

    pre-test {
        file mkdir ${worksrcpath}/build/lib
        system -W ${workpath} "unzip *.whl -d ${worksrcpath}/build/lib"
    }

    depends_test-append \
                    port:py${python.version}-pytest \
                    port:py${python.version}-pytest-benchmark \
                    port:py${python.version}-pytest-describe

    test.run        yes
    test.cmd        py.test-${python.branch}
    test.target
    test.env        PYTHONPATH=${worksrcpath}/build/lib
}
