Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pybind11/
Date: Thu, 31 Mar 2022 11:33:13
Message-Id: 1648726377.66682a3ef2c2b315a843fe0fba68f726a969e2c7.mgorny@gentoo
1 commit: 66682a3ef2c2b315a843fe0fba68f726a969e2c7
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 31 10:32:33 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 31 11:32:57 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66682a3e
7
8 dev-python/pybind11: Bump to 2.9.2
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pybind11/Manifest | 1 +
13 dev-python/pybind11/pybind11-2.9.2.ebuild | 58 +++++++++++++++++++++++++++++++
14 2 files changed, 59 insertions(+)
15
16 diff --git a/dev-python/pybind11/Manifest b/dev-python/pybind11/Manifest
17 index 7d84a59cbea8..a3808f1e9433 100644
18 --- a/dev-python/pybind11/Manifest
19 +++ b/dev-python/pybind11/Manifest
20 @@ -1 +1,2 @@
21 DIST pybind11-2.9.1.tar.gz 703882 BLAKE2B cc162332b637f81ea5d3098a2e9882f16a9c889e83e6ccd36d2a2da2f90361d8d188abd559f2313b45ff1de7d9ee56ee198c1193b47829d1fdf6d8871ce35b0c SHA512 1f268cc6df1f572658bfc3e60f7f010bec9b9444d6a6d6c95f7b26f7b4b7dd42846e65ae5a611c01c0341335fdfa84b01272b5c1b2cc11a418f64fecabfa0588
22 +DIST pybind11-2.9.2.tar.gz 709521 BLAKE2B 76ae9c72faad805885eabbe4dadf1092fe814f04f2a8d834da035c7389dcc996c09a63149911aa7a5c0b70d2da9f7c32e94aaf1c941f13345e0aef40a5748dfc SHA512 c6c18e5f59873adb3692640ade26472abd257607e7bb9fd48cfd1949878811e83d6ac6eb8c8dd926622d52ca4f13e5e6a58e0abaaaa1fa814ee831ea2b515272
23
24 diff --git a/dev-python/pybind11/pybind11-2.9.2.ebuild b/dev-python/pybind11/pybind11-2.9.2.ebuild
25 new file mode 100644
26 index 000000000000..4d0c873a8517
27 --- /dev/null
28 +++ b/dev-python/pybind11/pybind11-2.9.2.ebuild
29 @@ -0,0 +1,58 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +PYTHON_COMPAT=( python3_{8..10} )
36 +inherit cmake distutils-r1
37 +
38 +DESCRIPTION="AST-based Python refactoring library"
39 +HOMEPAGE="https://pybind11.readthedocs.io/en/stable/"
40 +SRC_URI="https://github.com/pybind/pybind11/archive/v${PV}.tar.gz -> ${P}.tar.gz"
41 +
42 +LICENSE="BSD"
43 +SLOT="0"
44 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
45 +
46 +RDEPEND="
47 + dev-cpp/eigen:3
48 +"
49 +BDEPEND="
50 + test? (
51 + >=dev-cpp/catch-2.13.5
52 + >=dev-libs/boost-1.56
53 + )
54 +"
55 +
56 +distutils_enable_tests pytest
57 +
58 +python_prepare_all() {
59 + export PYBIND11_USE_CMAKE=1
60 + cmake_src_prepare
61 + distutils-r1_python_prepare_all
62 +}
63 +
64 +python_configure() {
65 + local mycmakeargs=(
66 + # disable forced lto
67 + -DPYBIND11_LTO_CXX_FLAGS=
68 + -DPYBIND11_INSTALL=ON
69 + -DPYBIND11_TEST=$(usex test)
70 + )
71 + cmake_src_configure
72 +}
73 +
74 +python_compile() {
75 + distutils-r1_python_compile
76 + # Compilation only does anything for tests
77 + use test && cmake_src_compile
78 +}
79 +
80 +python_test() {
81 + cmake_build check
82 +}
83 +
84 +python_install() {
85 + distutils-r1_python_install
86 + cmake_src_install
87 +}