commit:     ec2568492a586ff3139ad891c403d968c11022a7
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 15 16:26:03 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Sep 15 18:30:48 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec256849

dev-python/nanobind: Fix parallel build failure

Closes: https://bugs.gentoo.org/936552
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/nanobind/files/nanobind-2.0.0-parallel-build.patch | 7 +++++++
 dev-python/nanobind/nanobind-2.0.0-r1.ebuild                  | 6 ++++++
 2 files changed, 13 insertions(+)

diff --git a/dev-python/nanobind/files/nanobind-2.0.0-parallel-build.patch 
b/dev-python/nanobind/files/nanobind-2.0.0-parallel-build.patch
new file mode 100644
index 000000000000..d64c7383b976
--- /dev/null
+++ b/dev-python/nanobind/files/nanobind-2.0.0-parallel-build.patch
@@ -0,0 +1,7 @@
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 62f2bdb..e932cca 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -75 +75 @@ nanobind_add_stub(
+-  DEPENDS py_stub_test.py
++  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/py_stub_test.py

diff --git a/dev-python/nanobind/nanobind-2.0.0-r1.ebuild 
b/dev-python/nanobind/nanobind-2.0.0-r1.ebuild
index b8dacc8d3b5e..45dce8c57782 100644
--- a/dev-python/nanobind/nanobind-2.0.0-r1.ebuild
+++ b/dev-python/nanobind/nanobind-2.0.0-r1.ebuild
@@ -34,11 +34,17 @@ EPYTEST_XDIST=1
 distutils_enable_tests pytest
 
 python_prepare_all() {
+       local PATCHES=(
+               # simplified version of 
https://github.com/wjakob/nanobind/pull/718
+               "${FILESDIR}/${PN}-2.0.0-parallel-build.patch"
+       )
+
        # This test assumes in-source build for the .pyi stubs.
        # (Hack because EPYTEST_IGNORE doesn't work with the paths it 
collects(?))
        echo > tests/test_stubs.py || die
 
        cmake_src_prepare
+       PATCHES=()
        distutils-r1_python_prepare_all
 }
 

Reply via email to