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

name                py-hatchling
version             1.27.0
revision            0
supported_archs     noarch
platforms           {darwin any}
license             MIT
maintainers         {mps @Schamschula} openmaintainer
description         This is the extensible, standards compliant build backend used by Hatch.
long_description    {*}${description}
homepage            https://hatch.pypa.io/latest/

checksums           rmd160  201c9cd8d9d82d2040d89aad3e6b82d9a5839356 \
                    sha256  971c296d9819abb3811112fc52c7a9751c8d381898f36533bb16f9791e941fd6 \
                    size    54983

python.versions     37 38 39 310 311 312 313

if {${name} ne ${subport}} {
    # Bootstraps itself, no backend dependencies needed
    python.pep517_backend

    depends_lib-append  \
                    port:py${python.version}-editables \
                    port:py${python.version}-packaging \
                    port:py${python.version}-pathspec \
                    port:py${python.version}-pluggy \
                    port:py${python.version}-trove-classifiers

    depends_run-append \
                    port:hatchling_select

    select.group    hatchling
    select.file     ${filespath}/py${python.version}-hatchling

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

    if {${python.version} == 37} {
        version     1.17.1

        checksums   rmd160  91708fc37f8431e36ec92f0cc8160fbd6b23a203 \
                    sha256  76dee5108f929b7eb9102df0a1bf88fa3247d68a44ff1f395e1cf32eaab0c6fa \
                    size    57207

        depends_lib-append  \
                    port:py${python.version}-importlib-metadata
    }
}