# -*- 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-uv-build
version             0.9.24
revision            0

categories-append   devel
platforms           {darwin any}
supported_archs     noarch
license             {MIT Apache-2}
maintainers         {reneeotten @reneeotten} openmaintainer

description         The uv build backend
long_description    {*}${description}

homepage            https://pypi.org/project/uv/

distname            uv_build-${version}

checksums           rmd160  8ae17420cca231b542ed5e1efb5191681d3b9acf \
                    sha256  1f67a6cb75f1a6a696ca408c2ef1afb31922ea7622b44c3be6ae6ab8aa750ead \
                    size    359788

python.versions     39 310 311 312 313 314
python.pep517_backend maturin

if {${name} ne ${subport}} {
    depends_lib-append \
                    port:uv

    # for now use the `uv` package to build the wheel instead of `uv_build`,
    # which is failing at the moment...
    post-patch {
        reinplace "s|USE_UV_EXECUTABLE = False|USE_UV_EXECUTABLE = True|g" \
            ${worksrcpath}/python/uv_build/__init__.py
    }
}
