# -*- 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.28.0
revision            0

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/

supported_archs     noarch
platforms           {darwin any}

checksums           rmd160  cfbd13a5c01708d2e2fbdde8b56ed9227573ea7b \
                    sha256  4d50b02aece6892b8cd0b3ce6c82cb218594d3ec5836dbde75bf41a21ab004c8 \
                    size    55365

python.versions     37 38 39 310 311 312 313 314

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
    }
}
