# -*- 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                meta-package-manager
version             8.3.0
revision            0

categories          sysutils python
platforms           {darwin any}
supported_archs     noarch
license             GPL-2+
maintainers         {deldycke.com:kevin @kdeldycke} openmaintainer

description         Wraps all package managers with a unifying CLI
long_description    mpm is a unifying command line interface on top of the \
                    150+ package managers it supports (Homebrew, MacPorts, \
                    pip, npm, cargo, gem and more): list, search, install, \
                    upgrade, remove, sync, clean up, back up and restore \
                    packages across all of them at once, with table, JSON, \
                    CSV and SBOM outputs.

homepage            https://mpm.run/

python.rootname     meta_package_manager

checksums           rmd160  330e9566925f7d6da309d32aa88656967b434578 \
                    sha256  dd06527de24f718ab141a37b920b88c3018f205175fbecf5f50a712008d5f606 \
                    size    5174421

python.default_version 314
python.pep517_backend uv

depends_lib-append  port:py${python.version}-click-extra \
                    port:py${python.version}-extra-platforms \
                    port:py${python.version}-tomli-w

# pytest-xdist registers the `xdist_group` marker the tests set.
depends_test-append port:py${python.version}-packageurl-python \
                    port:py${python.version}-pytest-xdist \
                    port:py${python.version}-tomlrt \
                    port:py${python.version}-yaml

# Run the hermetic layer from the unpacked sdist, excluding the tests that drive
# real package managers or need a login shell or a sudo policy.
test.run            yes
test.args-append    -o addopts="-m 'not integration and not host_environment'"
test.env-append     PYTHONPATH=${destroot}${python.pkgd}
