# -*- 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.1
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  024edfe736eed1f81ececa7c4ab169f8da10bb7e \
                    sha256  e5f2f389ececd7e86cd86863e3f921a9024cd04ce6ef6b36d07cd9a6dc37c9cd \
                    size    5252686

python.versions     310 311 312 313 314

python.pep517_backend \
                    hatch

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

    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}-uv-build \
                        port:py${python.version}-virtualenv

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

    patchfiles          patch-pyproject.toml.diff
}
