dev-python/pybind11: Bump to 3.0.1

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny 2025-08-23 07:37:14 +02:00
parent f2caa9279a
commit 803376c2d4
No known key found for this signature in database
GPG Key ID: 639ADAE2329E240E
2 changed files with 87 additions and 0 deletions

View File

@ -1,2 +1,3 @@
DIST pybind11-2.13.6.gh.tar.gz 800804 BLAKE2B 1f2efa05727ebbcd8e439b83bacfebb21d26a6f8f719e0a627633abdcae59837936e37e6441196e097e0075c9f922048d4e88146bb627d97ada28c48165bddb7 SHA512 497c25b33b09a9c42f67131ab82e35d689e8ce089dd7639be997305ff9a6d502447b79c824508c455d559e61f0186335b54dd2771d903a7c1621833930622d1a
DIST pybind11-3.0.0.gh.tar.gz 915234 BLAKE2B dfacb629b8d1cf5adeb30b305ca68f5db465fbec7a7da9b42485032279ac49721adbb248ce14c7acfdafecbd192e2542cccb08a61d8b3ee3884bbff9fc977a49 SHA512 a68a5eb3253db771308ed0922852207e6dc9a3089ad055ba3ccd36690f68b93cad98cc1a3ab822eb653153af2eeef10e6f6272b93314b2da1119e17f6c63337b
DIST pybind11-3.0.1.gh.tar.gz 918227 BLAKE2B 90700c919872cd697a59951ef86da0bd0487fe01cd3f3e1b54f2b0b6380a356271635796ea2289340377ecb6ec571ac921ad5dae0e4c82f579f7d8acefba72e5 SHA512 c17e6d6a78c38e760864b390ac2aa7df6a94ca53acb2e8be71f0d63d611b738fa20a16946c98a93fbfcad56cb0346ebf247bbe41c6f5171c6ce68397b1e5c4db

View File

@ -0,0 +1,86 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=scikit-build-core
PYTHON_COMPAT=( python3_{11..14} pypy3_11 )
inherit cmake distutils-r1
MY_P=${P/_}
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
-> ${MY_P}.gh.tar.gz
"
S=${WORKDIR}/${MY_P}
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos"
RDEPEND="
dev-cpp/eigen:3
"
BDEPEND="
test? (
<dev-cpp/catch-3:0
>=dev-cpp/catch-2.13.9:0
dev-libs/boost
dev-python/tomlkit[${PYTHON_USEDEP}]
)
"
EPYTEST_PLUGINS=()
EPYTEST_RERUNS=5
EPYTEST_XDIST=1
distutils_enable_tests pytest
src_prepare() {
cmake_src_prepare
distutils-r1_src_prepare
}
python_configure() {
DISTUTILS_ARGS=(
# disable forced lto
-DHAS_FLTO=OFF
# https://github.com/pybind/pybind11/issues/5087
-DPYBIND11_FINDPYTHON=OFF
-DPYBIND11_INSTALL=ON
-DPYBIND11_TEST=OFF
)
local mycmakeargs=(
"${DISTUTILS_ARGS[@]}"
-DPYBIND11_TEST=$(usex test)
# fix missing prefix, https://bugs.gentoo.org/961861
-Dprefix_for_pc_file="${EPREFIX}"/usr
)
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
cd "${BUILD_DIR}/tests" || die
epytest "${S}/tests"
}
python_install() {
distutils-r1_python_install
cmake_src_install
}