# -*- 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             1.0.3
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  27fc1165a31503686426797d990f6a8fff59f84b \
                    sha256  a4d7a05978ee37975c37743510c8991e2debce7ef83afb0a07c0c576fd4f16e8 \
                    size    477539

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