summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-04-03 19:41:28 +0200
committerMichał Górny <mgorny@gentoo.org>2024-04-03 19:44:12 +0200
commit5b8f85d5a907edf5a69dde2c35a378c6c69f7842 (patch)
treeed79a9eadd7aa5d87d69c1e97578d472c4ab411f /dev-python/pybind11
parentdev-cpp/catch: Bump to 2.13.10 (diff)
downloadgentoo-5b8f85d5a907edf5a69dde2c35a378c6c69f7842.tar.gz
gentoo-5b8f85d5a907edf5a69dde2c35a378c6c69f7842.tar.bz2
gentoo-5b8f85d5a907edf5a69dde2c35a378c6c69f7842.zip
dev-python/pybind11: Bump to 2.12.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/pybind11')
-rw-r--r--dev-python/pybind11/Manifest1
-rw-r--r--dev-python/pybind11/pybind11-2.12.0.ebuild74
2 files changed, 75 insertions, 0 deletions
diff --git a/dev-python/pybind11/Manifest b/dev-python/pybind11/Manifest
index a19b36b3cbd5..bf30c38b02bf 100644
--- a/dev-python/pybind11/Manifest
+++ b/dev-python/pybind11/Manifest
@@ -1 +1,2 @@
DIST pybind11-2.11.1.gh.tar.gz 756445 BLAKE2B 66ad933ffcd7fd475121f0b7488e13b914cb090d0ed511b96070e2849dcc537fb55e865b72fe06da6c5d1e3ed8e438799c5b0b60cbdc71e5713530174bff3be9 SHA512 ed1512ff0bca3bc0a45edc2eb8c77f8286ab9389f6ff1d5cb309be24bc608abbe0df6a7f5cb18c8f80a3bfa509058547c13551c3cd6a759af708fd0cdcdd9e95
+DIST pybind11-2.12.0.gh.tar.gz 771004 BLAKE2B df95d12cd005c85434ba8a4d80740f437f3f9433b0fbc9e6e1e5bf840281d5cb8295500b6510474a91b45201323b19079743ca927f7d1be2c1dc0dca89833e9c SHA512 c20247a4dccec310307174a26a79f9a98dd7ae7c84a48ad61c61589b02ef74caac26c2945de602cbe38b0bea65fc9985f1cc37f9e2322cae2f824dee98d602f1
diff --git a/dev-python/pybind11/pybind11-2.12.0.ebuild b/dev-python/pybind11/pybind11-2.12.0.ebuild
new file mode 100644
index 000000000000..69e54e32b12b
--- /dev/null
+++ b/dev-python/pybind11/pybind11-2.12.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=setuptools
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
+
+inherit cmake distutils-r1
+
+DESCRIPTION="AST-based Python refactoring library"
+HOMEPAGE="
+ https://pybind11.readthedocs.io/en/stable/
+ https://github.com/pybind/pybind11/
+ https://pypi.org/project/pybind11/
+"
+SRC_URI="
+ https://github.com/pybind/pybind11/archive/v${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos"
+
+RDEPEND="
+ dev-cpp/eigen:3
+"
+BDEPEND="
+ test? (
+ <dev-cpp/catch-3
+ >=dev-cpp/catch-2.13.9
+ dev-libs/boost
+ )
+"
+
+EPYTEST_XDIST=1
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ cmake_src_prepare
+ distutils-r1_python_prepare_all
+}
+
+python_configure() {
+ local mycmakeargs=(
+ # disable forced lto
+ -DHAS_FLTO=OFF
+ # https://github.com/pybind/pybind11/issues/5087
+ -DPYBIND11_FINDPYTHON=OFF
+ -DPYBIND11_INSTALL=ON
+ -DPYBIND11_TEST=$(usex test)
+ )
+ cmake_src_configure
+}
+
+python_compile() {
+ distutils-r1_python_compile
+ # Compilation only does anything for tests
+ use test && cmake_src_compile
+}
+
+python_test() {
+ cmake_build cpptest test_cmake_build
+
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ cd "${BUILD_DIR}/tests" || die
+ epytest "${S}/tests"
+}
+
+python_install() {
+ distutils-r1_python_install
+ cmake_src_install
+}