# -*- 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.30
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  e3d12c27baeed6cf575bf6bc183471ec74926049 \
                    sha256  c68563778333a3b796c48815fa08a47c9acb53748d4d82b48d79d47aee62639d \
                    size    360307

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
    }
}
