# -*- 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.8
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  c53ba31f782a7eeaeabd527ed186a05af1446628 \
                    sha256  dfad475e7c6b7507cd4262e1fdc49f72982e666e7b9b1c219583d34a0487d262 \
                    size    333344

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