# -*- 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-yarl
version             1.23.0
revision            0
categories-append   devel
license             Apache-2

maintainers         {ipglider.org:miguel @ipglider} openmaintainer

description         Yet another URL library
long_description    URL library with immutable URL objects.

homepage            https://github.com/aio-libs/yarl

checksums           rmd160  34a77ee602cfaa2efe891d72cdfb8460eecde109 \
                    sha256  53b1ea6ca88ebd4420379c330aea57e258408dd0df9af0992e5de2078dc9f5d5 \
                    size    194676

python.versions     310 311 312 313 314

compiler.c_standard 1999

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

    # https://trac.macports.org/ticket/72885
    # Xcode gcc fails anyway:
    # _quoting_c.c:17054: error: #pragma GCC diagnostic not allowed inside functions
    compiler.blacklist-append \
                            *gcc-4.0 *gcc-4.2

    if {${python.version} < 311} {
        depends_build-append \
                            port:py${python.version}-tomli
    }

    depends_lib-append      port:py${python.version}-idna \
                            port:py${python.version}-multidict \
                            port:py${python.version}-propcache

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

    test.run                yes
    test.env-append         PYTHONPATH=${destroot}${python.pkgd}
}
