# -*- 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-scikit-build-core
version             0.12.2
revision            0

categories-append   devel
license             Apache-2
platforms           {darwin any}
supported_archs     noarch

python.versions     310 311 312 313 314
python.pep517_backend hatch

maintainers         {stromnov @stromnov} openmaintainer

description         A bridge between Python package build systems and CMake (a rewrite of the classic Scikit-build).
long_description    \
    Scikit-build-core is a ground-up rewrite of the classic Scikit-build, a bridge between Python package \
    build systems and CMake, the most popular compiled language build system. Scikit-build-core was built \
    using Python packaging standards developed after scikit-build (classic) was written.

homepage            https://github.com/scikit-build/scikit-build-core/

distname            [string map {- _} ${python.rootname}]-${version}

checksums           rmd160  4eb4ef478135898e66091487516098f69753e4ea \
                    sha256  562e0bbc9de1a354c87825ccf732080268d6582a0200f648e8c4a2dcb1e3736d \
                    size    303553

if {${name} ne ${subport}} {
    patchfiles-append   patch-timeout-scikit_build_core-program_search.py.diff

    depends_build-append \
                        port:py${python.version}-hatch-vcs

    depends_lib-append  path:bin/cmake:cmake \
                        port:ninja \
                        port:py${python.version}-packaging \
                        port:py${python.version}-pathspec

    if {${python.version} < 311} {
        depends_lib-append \
                port:py${python.version}-exceptiongroup \
                port:py${python.version}-tomli \
                port:py${python.version}-typing_extensions
    }
}
