diff --git a/dev-python/nanobind/Manifest b/dev-python/nanobind/Manifest index 14b1c066b44d7..70208e7e5760e 100644 --- a/dev-python/nanobind/Manifest +++ b/dev-python/nanobind/Manifest @@ -3,3 +3,4 @@ DIST nanobind-2.13.0.gh.tar.gz 989569 BLAKE2B a392ea44b8d60f4244374f6e2ade5b6abd DIST nanobind-2.14.0.gh.tar.gz 992786 BLAKE2B fd9e67a11b7888ba8db61f3b68891997feda2391d6e6f8e982fa89d040c2c59e1c2b02b27ae0b4dbe7e4c0adf4ff5e20607a60266a2c7358f94e3d74dcb7564a SHA512 da52c51dc7b12623131abb4169fc91b4e8524e1c947348091ea4c6ec57a89d9eeb106db0900a78a7b206001c5eea736618c5416f61f4caf15c8e9d862d27d822 DIST nanobind-2.15.0.gh.tar.gz 999019 BLAKE2B 20ff4e038e277d04d6287b5a3dd103fe5b58481bfd29180d209426f4d7c7b8ff5ddd7af4fa82c57f3fdb83500b410e78a6e979b7f5cbfa0d632c339da126749c SHA512 376c4e86cec0e97fe9d6d844fe4e79c1cbfdd2d6355d68ee5b8acff4329983044ea0f22d0948f731ee82009afa7bba837f4f849967c831bad9ea322ffb52fc00 DIST nanobind-3.0.0.gh.tar.gz 1079064 BLAKE2B 60f70d9b1f5036d1012a700ce3ce380c3ccd7ef79005761b1ff860a1765d68640129045f35be32d6332bf86bc9c654eb9542a83efe1d8ff569ff1a527c04f0a8 SHA512 fd07f611e34a40c39c0ef8b860d7001551c8f2caf6b938d9e52d7439fd41f18cdd5ebaa7f8c2499a9238edc51ea8113583bbb4ac0a463b608f07b745ac5d33f8 +DIST nanobind-3.0.1.gh.tar.gz 1080674 BLAKE2B 3c9d3697955860b34dfab21c18093ab0e5b2e25bd2ed57550b34a3ccaff05f3eed17806580f6ed88508eb947b339297bd2552ca3eae8350ae0d38e34fb9e67b9 SHA512 122e9f09745df06806fc98792079c1ecaca37a9c5e6ddd6630e6a9375255ac849fac117b389da717d987ff8d5f9e00796837376f2e0ae621cc0187964369df57 diff --git a/dev-python/nanobind/nanobind-3.0.1.ebuild b/dev-python/nanobind/nanobind-3.0.1.ebuild new file mode 100644 index 0000000000000..ad089660d792e --- /dev/null +++ b/dev-python/nanobind/nanobind-3.0.1.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=scikit-build-core +PYTHON_COMPAT=( python3_{12..15} ) + +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="~alpha ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~s390 ~x86" + +DEPEND=" + >=dev-cpp/robin-map-1.3.0 +" +RDEPEND=" + ${DEPEND} +" + +EPYTEST_PLUGINS=() +EPYTEST_XDIST=1 +distutils_enable_tests pytest + +src_prepare() { + cmake_src_prepare + 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 + + cd "${BUILD_DIR}/tests" || die + epytest +}