# -*- 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.22
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  68a8889eb866207f6ca436a185c534ddc3e27f0b \
                    sha256  f10f1096b47a82185bba1e8cda2fec60c20162b085b96963aff705ef741551c6 \
                    size    357175

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