# -*- 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           github 1.0

github.setup        pypa pipx 1.18.19
revision            0
checksums           rmd160  fb8fa02cbd8711f9c8002df08a60d355b61c0375 \
                    sha256  ff551b5aa7fbbd66fbc45d4bed639d1bad9b59f5899f4c6e86f8cdf764055dd3 \
                    size    803538

categories          python sysutils
license             MIT
maintainers         {@mndavidoff alluvialsw.com:md14-macports} openmaintainer
supported_archs     noarch
platforms           {darwin any}

description         Execute binaries from Python packages in isolated environments
long_description    ${description}

github.tarball_from archive
github.livecheck.regex  {([\d.]+)}

if {
    ![variant_isset python311] &&
    ![variant_isset python312] &&
    ![variant_isset python313] &&
    ![variant_isset python314] &&
    ![variant_isset python315]
} {
    default_variants +python314
}

variant python311 conflicts python312 python313 python314 python315 description {Use Python 3.11} {}
variant python312 conflicts python311 python313 python314 python315 description {Use Python 3.12} {}
variant python313 conflicts python311 python312 python314 python315 description {Use Python 3.13} {}
variant python314 conflicts python311 python312 python313 python315 description {Use Python 3.14} {}
variant python315 conflicts python311 python312 python313 python314 description {Use Python 3.15} {}

if {[variant_isset python315]} {
    python.default_version 315
} elseif {[variant_isset python314]} {
    python.default_version 314
} elseif {[variant_isset python313]} {
    python.default_version 313
} elseif {[variant_isset python312]} {
    python.default_version 312
} elseif {[variant_isset python311]} {
    python.default_version 311
}

python.pep517       yes
python.pep517_backend hatch

build.env-append    SETUPTOOLS_SCM_PRETEND_VERSION=${version}

depends_build-append \
                    port:py${python.version}-docutils \
                    port:py${python.version}-hatch-fancy-pypi-readme \
                    port:py${python.version}-hatch-vcs \
                    port:py${python.version}-python-sbom

depends_lib-append  port:py${python.version}-argcomplete \
                    port:py${python.version}-filelock \
                    port:py${python.version}-packaging \
                    port:py${python.version}-platformdirs \
                    port:py${python.version}-userpath
