mirror of
https://codeberg.org/guix/guix.git
synced 2026-09-06 22:01:46 +00:00
* gnu/packages/python-xyz.scm (python-pydemumble): New variable. * gnu/packages/patches/python-pydemumble-system-nanobind.patch: New file. * gnu/local.mk (dist_patch_DATA): Register patch. Change-Id: I295a7c4db14da8990befe8c55beaf9970d020727
21 lines
660 B
Diff
21 lines
660 B
Diff
Use the system-wide installed nanobind instead of vendoring it via Git submodules.
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 92eab9d..3bc8b0d 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -44,8 +44,11 @@ add_definitions(
|
|
-DSWIFT_STDLIB_HAS_TYPE_PRINTING=1
|
|
)
|
|
|
|
-# finding nanobind
|
|
-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/nanobind)
|
|
+# See https://nanobind.readthedocs.io/en/latest/building.html#finding-nanobind
|
|
+execute_process(
|
|
+ COMMAND "${Python_EXECUTABLE}" -m nanobind --cmake_dir
|
|
+ OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE nanobind_ROOT)
|
|
+find_package(nanobind CONFIG REQUIRED)
|
|
|
|
nanobind_add_module(
|
|
pydemumble
|