Subject: [PATCH 4/5] gnu: Add python-scikit-build-core.

From: Vinicius Monego <[email-masked]>
Date: Tue, 5 Dec 2023 15:21:57 +0000

* gnu/packages/python-xyz.scm (python-scikit-build-core): New variable.

Change-Id: I6dac2c5062d51eaa15cff67cd94a938014229182
---
 gnu/packages/python-xyz.scm | 57 +++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 28dbea691f..36bd4c04be 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30855,6 +30855,63 @@ (define-public python-sane
                ;; Yet another variant of the X/MIT license.
                "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
 
+(define-public python-scikit-build-core
+  (package
+    (name "python-scikit-build-core")
+    (version "0.7.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "scikit_build_core" version))
+       (sha256
+        (base32 "1lvzcmsq6wmv396a5lq7wl6lx8165pz55ymjbbinr32nki3g5xw5"))))
+    (build-system pyproject-build-system)
+    ;; Skip network tests.
+    (arguments
+     (list #:test-flags #~(list "-m" "not network"
+                                ;; TODO: figure out why these tests fail.
+                                ;; (they also need write permission)
+                                "-k" (string-append
+                                      "not "
+                                      (string-join
+                                       (list "test_pep517_wheel"
+                                             "test_abi3_wheel"
+                                             "test_navigate_editable_pkg"
+                                             "test_pep517_mixed_wheel")
+                                       " and not ")))))
+    (propagated-inputs (list cmake
+                             python-exceptiongroup
+                             python-importlib-metadata
+                             python-importlib-resources
+                             python-packaging
+                             python-pathspec
+                             python-pyproject-metadata
+                             python-tomli
+                             python-typing-extensions))
+    (native-inputs (list pybind11
+                         python-cattrs
+                         python-fastjsonschema
+                         python-hatch-fancy-pypi-readme
+                         python-hatch-vcs
+                         python-hatchling
+                         python-numpy
+                         python-pytest
+                         python-pytest-subprocess
+                         ;; Latest setuptools fails with "setup.py install is
+                         ;; deprecated.  Use build and pip or other standards-
+                         ;; based tools".
+                         python-setuptools-57
+                         python-setuptools-scm
+                         python-virtualenv
+                         python-wheel))
+    (home-page "https://scikit-build-core.readthedocs.io/en/latest/")
+    (synopsis "Build backend for CMake based projects")
+    (description
+     "Scikit-build-core is a complete ground-up rewrite of scikit-build on top
+of modern packaging APIs.  It provides a bridge between CMake and the Python
+build system, allowing you to make Python modules with CMake.")
+    (license license:asl2.0)))
+
 (define-public python-scikit-build
   (package
     (name "python-scikit-build")
-- 
2.39.2