# -*- 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-hatch
version             1.17.0
revision            0

categories-append   devel
license             MIT
maintainers         {mps @Schamschula} openmaintainer
description         Hatch is a modern, extensible Python project manager.
long_description    {*}${description}
homepage            https://github.com/ofek/hatch

supported_archs     noarch
platforms           {darwin any}

checksums           rmd160  dda125bbaaaf9561296aa7d12ba236dce988762c \
                    sha256  2bbbf4aa8f6fda71a61fc24c22619261327b53d272b22d4cc16f4a6e9a8592bb \
                    size    5250272

python.versions     310 311 312 313 314

python.pep517_backend \
                    hatch

if {${name} ne ${subport}} {
    depends_build-append \
                        port:py${python.version}-hatch-vcs \
                        port:py${python.version}-uv-build

    depends_lib-append  port:py${python.version}-atomicwrites \
                        port:py${python.version}-click \
                        port:py${python.version}-hatchling \
                        port:py${python.version}-httpx2 \
                        port:py${python.version}-hyperlink \
                        port:py${python.version}-keyring \
                        port:py${python.version}-pexpect \
                        port:py${python.version}-platformdirs \
                        port:py${python.version}-pyperclip \
                        port:py${python.version}-pyproject_hooks \
                        port:py${python.version}-python-discovery \
                        port:py${python.version}-rich \
                        port:py${python.version}-shellingham \
                        port:py${python.version}-tomli-w \
                        port:py${python.version}-tomlkit \
                        port:py${python.version}-trove-classifiers \
                        port:py${python.version}-userpath \
                        port:py${python.version}-virtualenv

    if {${python.version} < 314} {
        depends_lib-append  \
                        port:py${python.version}-backports.zstd
    }

    patchfiles          patch-pyproject.toml.diff
}
