commit:     c357b0016ca92a44af56e5dcd44a0173d517682f
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri May 30 01:25:08 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri May 30 01:25:08 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c357b001

dev-python/pybind11: Bump to 3.0.0_rc2

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pybind11/Manifest                  |  1 +
 dev-python/pybind11/pybind11-3.0.0_rc2.ebuild | 85 +++++++++++++++++++++++++++
 2 files changed, 86 insertions(+)

diff --git a/dev-python/pybind11/Manifest b/dev-python/pybind11/Manifest
index 8b3281109753..47c2bf6299f9 100644
--- a/dev-python/pybind11/Manifest
+++ b/dev-python/pybind11/Manifest
@@ -1,2 +1,3 @@
 DIST pybind11-2.13.6.gh.tar.gz 800804 BLAKE2B 
1f2efa05727ebbcd8e439b83bacfebb21d26a6f8f719e0a627633abdcae59837936e37e6441196e097e0075c9f922048d4e88146bb627d97ada28c48165bddb7
 SHA512 
497c25b33b09a9c42f67131ab82e35d689e8ce089dd7639be997305ff9a6d502447b79c824508c455d559e61f0186335b54dd2771d903a7c1621833930622d1a
 DIST pybind11-3.0.0rc1.gh.tar.gz 902027 BLAKE2B 
9ddc7a5307b8e2fd53d99b8f93afd960ba73c9a04dd1b89f4b53b4e80f4bede74a823643c6e40d43741321b5b73752738782c1f601158cb77a4d6f58485cb002
 SHA512 
e05369a1082e3980055970d8fa9dddb54f2d1d75ef1e9968f62a02d9d00b9d22109359f97fd8cc0a2a8881c8126f5820c08cd41dd29c998a1c60c6a69c9a3983
+DIST pybind11-3.0.0rc2.gh.tar.gz 904127 BLAKE2B 
7d64cece4672c0c46d5a9114e06f4d877382e501cc3a926f7ed9aa2909bbb49ba8a2e7a6516ffde7f483aa6c0dbd43c4114e9fb4c05bf361fc87e65bd7bd9788
 SHA512 
ed36f00bbcdf4f52962eb2a52eb6ba1a7be7e9a3c81556676e8b8d52ce2a79c8e59c5e21da6acc149ba5a5d0e7ed60dbb2e80647d4228f46993c4c20ac3eae31

diff --git a/dev-python/pybind11/pybind11-3.0.0_rc2.ebuild 
b/dev-python/pybind11/pybind11-3.0.0_rc2.ebuild
new file mode 100644
index 000000000000..07a634804a43
--- /dev/null
+++ b/dev-python/pybind11/pybind11-3.0.0_rc2.ebuild
@@ -0,0 +1,85 @@
+# 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..13} 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"
+
+RDEPEND="
+       dev-cpp/eigen:3
+"
+BDEPEND="
+       test? (
+               <dev-cpp/catch-3:0
+               >=dev-cpp/catch-2.13.9:0
+               dev-libs/boost
+               dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
+               dev-python/tomlkit[${PYTHON_USEDEP}]
+       )
+"
+
+EPYTEST_XDIST=1
+distutils_enable_tests pytest
+
+src_prepare() {
+       cmake_src_prepare
+       distutils-r1_src_prepare
+
+       # https://github.com/scikit-build/scikit-build-core/issues/912
+       sed -i -e '/scikit-build-core/s:0\.11\.2:0.8:' pyproject.toml || die
+}
+
+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)
+       )
+       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 -p rerunfailures --reruns=5 "${S}/tests"
+}
+
+python_install() {
+       distutils-r1_python_install
+       cmake_src_install
+}

Reply via email to