# -*- 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
version             0.18.1
revision            1
categories-append   devel
license             BSD
platforms           {darwin any}
supported_archs     noarch

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

maintainers         {stromnov @stromnov} openmaintainer

description         Improved build system generator for CPython extensions.
long_description    {*}${description}

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

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

checksums           rmd160  4a6ebc3bb47946f45d2312133526dd51844f6665 \
                    sha256  a4152ac5a084d499c28a7797be0628d8366c336e2fb0e1a063eb32e55efcb8e7 \
                    size    274171

if {${name} ne ${subport}} {
    depends_build-append \
                        port:py${python.version}-hatch-vcs \
                        port:py${python.version}-hatch-fancy-pypi-readme

    depends_lib-append  port:py${python.version}-distro \
                        port:py${python.version}-packaging \
                        port:py${python.version}-setuptools \
                        port:py${python.version}-wheel \
                        path:bin/cmake:cmake

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

    # https://github.com/scikit-build/scikit-build/issues/1123
    platform darwin {
        patchfiles-append   patch-fix-macOS-archs.diff
    }
}
