summaryrefslogtreecommitdiff
path: root/dev-python/pybind11
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pybind11')
-rw-r--r--dev-python/pybind11/Manifest2
-rw-r--r--dev-python/pybind11/metadata.xml13
-rw-r--r--dev-python/pybind11/pybind11-3.0.1.ebuild86
-rw-r--r--dev-python/pybind11/pybind11-3.0.4.ebuild86
4 files changed, 187 insertions, 0 deletions
diff --git a/dev-python/pybind11/Manifest b/dev-python/pybind11/Manifest
new file mode 100644
index 000000000000..c463e09273dd
--- /dev/null
+++ b/dev-python/pybind11/Manifest
@@ -0,0 +1,2 @@
+DIST pybind11-3.0.1.gh.tar.gz 918227 BLAKE2B 90700c919872cd697a59951ef86da0bd0487fe01cd3f3e1b54f2b0b6380a356271635796ea2289340377ecb6ec571ac921ad5dae0e4c82f579f7d8acefba72e5 SHA512 c17e6d6a78c38e760864b390ac2aa7df6a94ca53acb2e8be71f0d63d611b738fa20a16946c98a93fbfcad56cb0346ebf247bbe41c6f5171c6ce68397b1e5c4db
+DIST pybind11-3.0.4.gh.tar.gz 966373 BLAKE2B 6a90953a1b46fab90257d56e7db3ff7233ecec1f97e0305d6673b0ce295980d4fa063f88fd5095a7609c188884eef246d291452daeebbf9a7e0794331531596d SHA512 40b40ec9fdde7b377222fa329162638be5e66bee75918d78369f741dc14b52f058fb50bb33159d099fc40f43aca39234092ce884cccc3258f34274c7dde807f0
diff --git a/dev-python/pybind11/metadata.xml b/dev-python/pybind11/metadata.xml
new file mode 100644
index 000000000000..6dd6c4399dfa
--- /dev/null
+++ b/dev-python/pybind11/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>perfinion@gentoo.org</email>
+ <name>Jason Zaman</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>
diff --git a/dev-python/pybind11/pybind11-3.0.1.ebuild b/dev-python/pybind11/pybind11-3.0.1.ebuild
new file mode 100644
index 000000000000..6ba23efa1565
--- /dev/null
+++ b/dev-python/pybind11/pybind11-3.0.1.ebuild
@@ -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_{13..14} )
+
+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:=
+"
+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
+}
diff --git a/dev-python/pybind11/pybind11-3.0.4.ebuild b/dev-python/pybind11/pybind11-3.0.4.ebuild
new file mode 100644
index 000000000000..ce967ed0d859
--- /dev/null
+++ b/dev-python/pybind11/pybind11-3.0.4.ebuild
@@ -0,0 +1,86 @@
+# 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_{13..14} )
+
+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:=
+"
+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
+}