# -*- 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.25
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  5977a5aa3c4cc4d7a998af4d08624490c94bfe35 \
                    sha256  0683591211daf8d60c95da01536f7afb8324f8382e9d14b1580d33d9bee40cf4 \
                    size    359005

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