diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-09-16 12:11:35 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-09-16 12:11:35 +0100 |
commit | b66ecfb4dc09ba76e37787df2f7df1a78c3c1cc9 (patch) | |
tree | 884bce771a1bba8b311dfffbde4acdad07bf2c54 /dev-python/nanobind | |
parent | 08e318096831eb3aae369910ba75e27f59367e2f (diff) |
gentoo auto-resync : 16:09:2024 - 12:11:35
Diffstat (limited to 'dev-python/nanobind')
-rw-r--r-- | dev-python/nanobind/Manifest | 5 | ||||
-rw-r--r-- | dev-python/nanobind/files/nanobind-2.0.0-parallel-build.patch | 7 | ||||
-rw-r--r-- | dev-python/nanobind/nanobind-2.0.0-r1.ebuild | 6 | ||||
-rw-r--r-- | dev-python/nanobind/nanobind-2.1.0.ebuild | 74 |
4 files changed, 91 insertions, 1 deletions
diff --git a/dev-python/nanobind/Manifest b/dev-python/nanobind/Manifest index 4b1bc7ad8b28..586668fc3306 100644 --- a/dev-python/nanobind/Manifest +++ b/dev-python/nanobind/Manifest @@ -1,3 +1,6 @@ +AUX nanobind-2.0.0-parallel-build.patch 256 BLAKE2B fc1f66b4cdc4c6f61ac6053cbd5150936c9e23adc18e655779f4a884e7a22be5b217dfc25272b58ffd7566c7cad28a5a8092727ffd8bc2eb42c4c4fc8741d1de SHA512 e975b62595143f5ae31e5a159ab3fe13c03de48fda92d7c39339b1641278ae86e36bf682a9108ee3434a0a9a490d4b7f779c7fef783119da60909c0c25385dc5 DIST nanobind-2.0.0.gh.tar.gz 842956 BLAKE2B 82a2b44d904a2bfc88538d3bac6d5d96b473bcca2ff98647f9edd656a1d20fae324fcf334b848f861723aae666690b6b17ee626dede89bac6b140e9ef8cd01fe SHA512 1bafbf6b18c9b65b5ecb3bbf23a164b17ee52ef4f053a00de986a35e17e662422b54cea1c145f83ee8a3973bba383a949b3c305dcfecfbf139ab90006d42935e -EBUILD nanobind-2.0.0-r1.ebuild 1576 BLAKE2B 15a020d655337414fedbea7a991ee2717cd2c99681798e7b3874283909afa1e90dd1f25c43f2c4128594dd95e0660883d603ba09f2d6e30878fcb6d13f7a5232 SHA512 e9965bb39bf97b10a5051ecd9514cd2d0637371c7389a5408150e4776801b5536978c7fb227473bcaa2f2386aea9f29e7136b3b94d6fee818521d6482b89f5a2 +DIST nanobind-2.1.0.gh.tar.gz 850714 BLAKE2B 5686c0b204904d22e306338f0cf62f0ac306165510f94bfe94d6a36f8294ea108f2f195c67b5314476e9bc3083292c69974c52889015e2ac6cb996a0fbcfbaff SHA512 1aaca50f8253b1b831e1d7092cfb238a020f72b7ae9830b04ecaff519a38dbe1396f79aac3098d942f30e7bb372862a2473459adbab898f17683ee488a0dad87 +EBUILD nanobind-2.0.0-r1.ebuild 1728 BLAKE2B 0bc365c7fd52e7de359ea1b151f507ac9a3cbf306188d8b789d79cbd14b008fd9fd17a2c2595bac2c55b70938a24b858195e0852eb48f711b491b32b4c199d14 SHA512 63e5292eaf2e90f4399616b86408a97b543dd4c8d349cf25785010bb09733debfb76662941dac3d75b32c3ac1fef35fa692757bf79b8d9f79073d496a861e66d +EBUILD nanobind-2.1.0.ebuild 1510 BLAKE2B a86bf1a79868947b1a8e25bda3096206a4d9614851ebcbb41093fa7a1bf311accafd5b5c66da530bac0a0f0e2e7dd30c809bdc48b62aba74f7acb0fc83fa78de SHA512 cc0ef43b5dfa7ee776214e6b28eadd397fece6d1f34cf2995b967374e4653cef47c8c005fbd75f1ae4a80166d1e58dab547a0337063361a6ffb7d12569c1f9df MISC metadata.xml 367 BLAKE2B 915d33ed8f2b0e38faec001e256fc86d393b23b94bae31f2648948339be7c3d6a2b1b2a18063193c9d190cabfdc4c744d6b664c63534b88dc7afc2a2f1ccc688 SHA512 b60a701257bad827d63af141fbc9b4cadadbb397bca054db97c63eba9e174a902afc7785c3f868b6e86ec62f007f7e822d3c5b6dacb107083559b31202cef7a2 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 } diff --git a/dev-python/nanobind/nanobind-2.1.0.ebuild b/dev-python/nanobind/nanobind-2.1.0.ebuild new file mode 100644 index 000000000000..6a01b59dbefb --- /dev/null +++ b/dev-python/nanobind/nanobind-2.1.0.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=scikit-build-core +PYTHON_COMPAT=( python3_{10..13} ) + +inherit cmake distutils-r1 + +DESCRIPTION="Tiny and efficient C++/Python bindings" +HOMEPAGE=" + https://github.com/wjakob/nanobind + https://pypi.org/project/nanobind/ +" +SRC_URI=" + https://github.com/wjakob/nanobind/archive/refs/tags/v${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc64 ~riscv" + +DEPEND=" + >=dev-cpp/robin-map-1.3.0 +" +RDEPEND=" + ${DEPEND} +" +BDEPEND=" + $(python_gen_cond_dep ' + dev-python/typing-extensions[${PYTHON_USEDEP}] + ' 3.10) +" + +EPYTEST_XDIST=1 +distutils_enable_tests pytest + +src_prepare() { + local PATCHES=( + # simplified version of https://github.com/wjakob/nanobind/pull/718 + "${FILESDIR}/${PN}-2.0.0-parallel-build.patch" + ) + + cmake_src_prepare + PATCHES=() + distutils-r1_src_prepare +} + +src_configure() { + # XXX: nanobind installs a CMake config file which by default passes -Os + # We currently patch around it in dev-python/pyopencl. In future, we + # may want to add some override with Gentoo specific environment vars. + DISTUTILS_ARGS=( + -DNB_CREATE_INSTALL_RULES=ON + -DNB_USE_SUBMODULE_DEPS=OFF + -DNB_TEST=OFF + ) +} + +python_test() { + local mycmakeargs=( + -DNB_CREATE_INSTALL_RULES=OFF + -DNB_USE_SUBMODULE_DEPS=OFF + -DNB_TEST=ON + ) + cmake_src_configure + cmake_src_compile + + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + cd "${BUILD_DIR}/tests" || die + epytest +} |