diff --git a/nanobind-2.6.1-test-build.patch b/nanobind-2.6.1-test-build.patch new file mode 100644 index 0000000..9f99160 --- /dev/null +++ b/nanobind-2.6.1-test-build.patch @@ -0,0 +1,66 @@ + +bugzilla.opensuse.org/show_bug.cgi?id=1239153 +github.com/wjakob/nanobind/issues/970 +github.com/wjakob/nanobind/commit/f2b08c9 + +edited to fit file version from distribution + + +From f2b08c936ec4b1dd06d374fef2637d89daa905f4 Mon Sep 17 00:00:00 2001 +From: Wenzel Jakob +Date: Tue, 8 Apr 2025 10:57:30 +0900 +Subject: [PATCH] fix parallel test suite build race condition + +--- + tests/CMakeLists.txt | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 40ed1276..3bd54783 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -92,14 +92,22 @@ endforeach() + + target_sources(test_intrusive_ext PRIVATE test_intrusive_impl.cpp) + ++if (CMAKE_CONFIGURATION_TYPES) ++ set(OUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/$) ++else() ++ set(OUT_DIR ${CMAKE_CURRENT_BINARY_DIR}) ++endif() ++ + foreach (NAME functions classes ndarray stl enum typing make_iterator) + if (NAME STREQUAL typing) + set(EXTRA + MARKER_FILE py.typed + PATTERN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/pattern_file.nb" + ) ++ set(EXTRA_DEPENDS "${OUT_DIR}/py_stub_test.py") + else() + set(EXTRA "") ++ set(EXTRA_DEPENDS "") + endif() + + if (CMAKE_CONFIGURATION_TYPES) +@@ -112,7 +120,7 @@ foreach (NAME functions classes ndarray jax tensorflow stl enum typing make_iter + MODULE test_${NAME}_ext + OUTPUT ${PYI_PREFIX}test_${NAME}_ext.pyi + PYTHON_PATH $ +- DEPENDS test_${NAME}_ext ++ DEPENDS test_${NAME}_ext ${EXTRA_DEPENDS} + ${EXTRA}) + endforeach() + +@@ -179,12 +187,6 @@ set(TEST_FILES + + set (PY_STUB_TEST py_stub_test.py) + if (NOT (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR) OR MSVC) +- if (CMAKE_CONFIGURATION_TYPES) +- set(OUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/$) +- else() +- set(OUT_DIR ${CMAKE_CURRENT_BINARY_DIR}) +- endif() +- + foreach(TEST_FILE IN LISTS TEST_FILES) + set(IN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${TEST_FILE}) + set(OUT_FILE ${OUT_DIR}/${TEST_FILE}) diff --git a/python-nanobind.changes b/python-nanobind.changes index a6c0307..9a683b7 100644 --- a/python-nanobind.changes +++ b/python-nanobind.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Apr 9 14:51:23 UTC 2025 - Friedrich Haubensak + +- add nanobind-2.6.1-test-build.patch to fix test on single + processor (boo #1239153) + +------------------------------------------------------------------- Fri Mar 18 18:32:19 UTC 2025 - Friedrich Haubensak - update to release 2.6.1 diff --git a/python-nanobind.spec b/python-nanobind.spec index 1d11258..70a1f32 100644 --- a/python-nanobind.spec +++ b/python-nanobind.spec @@ -26,6 +26,8 @@ URL: https://github.com/wjakob/nanobind Source: https://github.com/wjakob/nanobind/archive/refs/tags/v%{version}.tar.gz#/nanobind-%{version}.tar.gz # PATCH-FEATURE-OPENSUSE nanobind-installationpath.patch Patch1: nanobind-installationpath.patch +# PATCH-FIX_UPSTREAM nanobind-2.6.1-test-build.patch +Patch2: nanobind-2.6.1-test-build.patch BuildRequires: cmake BuildRequires: %{python_module base} BuildRequires: python-rpm-macros