summaryrefslogtreecommitdiff
path: root/dev-python/pybind11
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /dev-python/pybind11
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'dev-python/pybind11')
-rw-r--r--dev-python/pybind11/Manifest7
-rw-r--r--dev-python/pybind11/files/pybind11-2.9.1-numpy-1.22.patch173
-rw-r--r--dev-python/pybind11/pybind11-2.9.0.ebuild2
-rw-r--r--dev-python/pybind11/pybind11-2.9.1.ebuild (renamed from dev-python/pybind11/pybind11-2.8.1.ebuild)10
4 files changed, 185 insertions, 7 deletions
diff --git a/dev-python/pybind11/Manifest b/dev-python/pybind11/Manifest
index f8efa8dbb111..744e9a6aa37c 100644
--- a/dev-python/pybind11/Manifest
+++ b/dev-python/pybind11/Manifest
@@ -1,5 +1,6 @@
-DIST pybind11-2.8.1.tar.gz 693075 BLAKE2B 00f691121858bbe019b5398ab5418523b352f29716901ec6572817e3a35efeb953a9a1542ad37830aab6b9e5a6d6dd56c7aee390772f1d992ef570e03472ebd8 SHA512 6738b4551a1ca2fdf6676be78216b9056cecf8b4d125f0d1aaae9929614bcbf4a9b233fc3c52b8f9dfd19a9ca1496515e6748c1afd8968b9c52c9a1e8b28da10
+AUX pybind11-2.9.1-numpy-1.22.patch 7014 BLAKE2B 1031edbb4985778b791562c499cb85262c2164b3386ceeb7d91f92a9ac61b79d799c3dadddb1fc75d63409aaead5cfeca2d301f37271ded184a10f8f1c49a83e SHA512 815e6b076a149928e91318afbb2d3664d1226be231cec1d35c27fb4f85315884bd58efc18dfd57352b5278673c0a3ca14b1ad5892c5d0a80670b9f76f338e421
DIST pybind11-2.9.0.tar.gz 698784 BLAKE2B bfbe173d580131e445d759bd9b1a8929ceb9fc357a1ed8873aa8024fb9226a37bb97293dc0189a67ae61a232f3790ca6f635a30d0a0401c867cde98f1010438c SHA512 87184c9e09e1340f2d34786a66560fe77684a3629b517f78321073a1f0dfdb766365d3698dcf6f08e5141b1f4da50ec917e61b36538e5a1ec9fd1b68f29cd396
-EBUILD pybind11-2.8.1.ebuild 1072 BLAKE2B a168784e70bf21188a8a0180a5db73fc6e2e4b392b16d0172e50fa67dbb486a7e7d4d1d1e7afcae7e79bff5ac4d877c7249f2bdb5b809effe9e1727f0056abb3 SHA512 be3d0bd87ef1d8df6f008356246f45e71537960491e347c3cdf0e1ed21abc25139e3b6540334012d0e7eb69856349bff08b4520f8fa42d2224cdf4dd7b61635f
-EBUILD pybind11-2.9.0.ebuild 1073 BLAKE2B 5b15c7610c99c6d08f593acb05a80fe8dc8093de14fb486cc3c303e4fe914b670ad2f94edc96b46910a494e6064d9b09070fa3c8a4ca51941b06f18d551ecbfd SHA512 698115df5c688d4f9a88ead17815616204821a314f0ccf3982815d141d79a03c99fb09e08de5b5b60d0222537d2eb948ab5c371e16eb600c00714179751c8333
+DIST pybind11-2.9.1.tar.gz 703882 BLAKE2B cc162332b637f81ea5d3098a2e9882f16a9c889e83e6ccd36d2a2da2f90361d8d188abd559f2313b45ff1de7d9ee56ee198c1193b47829d1fdf6d8871ce35b0c SHA512 1f268cc6df1f572658bfc3e60f7f010bec9b9444d6a6d6c95f7b26f7b4b7dd42846e65ae5a611c01c0341335fdfa84b01272b5c1b2cc11a418f64fecabfa0588
+EBUILD pybind11-2.9.0.ebuild 1079 BLAKE2B c35aef66a8e3213e7e3a017fd00db9f37c5683ff4aef60bc3ac4c5715ae508baf501b424b412bfce3d9fc0b920f3da61f963d59fc6e2a6d305b8c357ab2aec20 SHA512 24b94bf416689f894e3b79172fa803d2367af012a2519de3ea89236abacf6b7aefc36411f27c882832e6616b10ac28136012cca816a9147b7a16b094d02f3ca2
+EBUILD pybind11-2.9.1.ebuild 1192 BLAKE2B 9b7d291ea19a39ebeee160d1e0719c66942ad29c96eecf2dbc34ab26f543760e1bfbe05c5720aa7a0e18968f4569c163c0880f23e05ee98c4a0ff51cfaf636d9 SHA512 15cb299d4c0e876caff5f9cf716d701eddc3cf18540c3cc9ed3aa02b0f6c2f414b79c34f6e6ab69fc52007474b5143fde87148e440fdc42b4c987bbf4c23ad4d
MISC metadata.xml 420 BLAKE2B 8a3480ac275b7e2893d696bf4fd0d70f41ea941fab9e24b19d8561c0efeee81024ba6fea0ab26333346f3c176d1a87b35229e31ecefc74de2e7614600a64013e SHA512 8140e933878a75968420deab189bab1decd030b5209baada2857a7659dc32980bbc46678c6612ef56e4b4f6b598579bb8227e6c7fd00fbde63a40eb13bccf86c
diff --git a/dev-python/pybind11/files/pybind11-2.9.1-numpy-1.22.patch b/dev-python/pybind11/files/pybind11-2.9.1-numpy-1.22.patch
new file mode 100644
index 000000000000..c7f16fb53364
--- /dev/null
+++ b/dev-python/pybind11/files/pybind11-2.9.1-numpy-1.22.patch
@@ -0,0 +1,173 @@
+From 116f8c7db5a11d0e1e7830de3f2bbf3e5ed1316c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 3 Feb 2022 17:41:45 +0100
+Subject: [PATCH 1/2] test: Strip whitespace when comparing numpy dtypes for
+ 1.22 compat
+
+Strip whitespace when comparing numpy dtype str() in order to preserve
+test compatibility with both numpy 1.22 and older versions whose output
+differ by whitespace.
+
+Fixes #3680
+---
+ tests/test_numpy_dtypes.py | 44 +++++++++++++++++++-------------------
+ 1 file changed, 22 insertions(+), 22 deletions(-)
+
+diff --git a/tests/test_numpy_dtypes.py b/tests/test_numpy_dtypes.py
+index 06e578329e..43480334aa 100644
+--- a/tests/test_numpy_dtypes.py
++++ b/tests/test_numpy_dtypes.py
+@@ -32,8 +32,8 @@ def dt_fmt():
+ e = "<" if byteorder == "little" else ">"
+ return (
+ "{{'names':['bool_','uint_','float_','ldbl_'],"
+- " 'formats':['?','" + e + "u4','" + e + "f4','" + e + "f{}'],"
+- " 'offsets':[0,4,8,{}], 'itemsize':{}}}"
++ "'formats':['?','" + e + "u4','" + e + "f4','" + e + "f{}'],"
++ "'offsets':[0,4,8,{}],'itemsize':{}}}"
+ )
+
+
+@@ -46,7 +46,7 @@ def simple_dtype_fmt():
+ def packed_dtype_fmt():
+ from sys import byteorder
+
+- return "[('bool_', '?'), ('uint_', '{e}u4'), ('float_', '{e}f4'), ('ldbl_', '{e}f{}')]".format(
++ return "[('bool_','?'),('uint_','{e}u4'),('float_','{e}f4'),('ldbl_','{e}f{}')]".format(
+ np.dtype("longdouble").itemsize, e="<" if byteorder == "little" else ">"
+ )
+
+@@ -77,7 +77,7 @@ def partial_nested_fmt():
+ partial_size = partial_ld_off + ld.itemsize
+ partial_end_padding = partial_size % np.dtype("uint64").alignment
+ partial_nested_size = partial_nested_off * 2 + partial_size + partial_end_padding
+- return "{{'names':['a'], 'formats':[{}], 'offsets':[{}], 'itemsize':{}}}".format(
++ return "{{'names':['a'],'formats':[{}],'offsets':[{}],'itemsize':{}}}".format(
+ partial_dtype_fmt(), partial_nested_off, partial_nested_size
+ )
+
+@@ -123,25 +123,25 @@ def test_dtype(simple_dtype):
+
+ e = "<" if byteorder == "little" else ">"
+
+- assert m.print_dtypes() == [
++ assert [x.replace(' ', '') for x in m.print_dtypes()] == [
+ simple_dtype_fmt(),
+ packed_dtype_fmt(),
+- "[('a', {}), ('b', {})]".format(simple_dtype_fmt(), packed_dtype_fmt()),
++ "[('a',{}),('b',{})]".format(simple_dtype_fmt(), packed_dtype_fmt()),
+ partial_dtype_fmt(),
+ partial_nested_fmt(),
+- "[('a', 'S3'), ('b', 'S3')]",
++ "[('a','S3'),('b','S3')]",
+ (
+- "{{'names':['a','b','c','d'], "
+- + "'formats':[('S4', (3,)),('"
++ "{{'names':['a','b','c','d'],"
++ + "'formats':[('S4',(3,)),('"
+ + e
+- + "i4', (2,)),('u1', (3,)),('"
++ + "i4',(2,)),('u1',(3,)),('"
+ + e
+- + "f4', (4, 2))], "
+- + "'offsets':[0,12,20,24], 'itemsize':56}}"
++ + "f4',(4,2))],"
++ + "'offsets':[0,12,20,24],'itemsize':56}}"
+ ).format(e=e),
+- "[('e1', '" + e + "i8'), ('e2', 'u1')]",
+- "[('x', 'i1'), ('y', '" + e + "u8')]",
+- "[('cflt', '" + e + "c8'), ('cdbl', '" + e + "c16')]",
++ "[('e1','" + e + "i8'),('e2','u1')]",
++ "[('x','i1'),('y','" + e + "u8')]",
++ "[('cflt','" + e + "c8'),('cdbl','" + e + "c16')]",
+ ]
+
+ d1 = np.dtype(
+@@ -238,7 +238,7 @@ def test_recarray(simple_dtype, packed_dtype):
+ ]
+
+ arr = m.create_rec_partial(3)
+- assert str(arr.dtype) == partial_dtype_fmt()
++ assert str(arr.dtype).replace(' ', '') == partial_dtype_fmt()
+ partial_dtype = arr.dtype
+ assert "" not in arr.dtype.fields
+ assert partial_dtype.itemsize > simple_dtype.itemsize
+@@ -246,7 +246,7 @@ def test_recarray(simple_dtype, packed_dtype):
+ assert_equal(arr, elements, packed_dtype)
+
+ arr = m.create_rec_partial_nested(3)
+- assert str(arr.dtype) == partial_nested_fmt()
++ assert str(arr.dtype).replace(' ', '') == partial_nested_fmt()
+ assert "" not in arr.dtype.fields
+ assert "" not in arr.dtype.fields["a"][0].fields
+ assert arr.dtype.itemsize > partial_dtype.itemsize
+@@ -285,12 +285,12 @@ def test_array_array():
+ e = "<" if byteorder == "little" else ">"
+
+ arr = m.create_array_array(3)
+- assert str(arr.dtype) == (
+- "{{'names':['a','b','c','d'], "
+- + "'formats':[('S4', (3,)),('"
++ assert str(arr.dtype).replace(' ', '') == (
++ "{{'names':['a','b','c','d'],"
++ + "'formats':[('S4',(3,)),('"
+ + e
+- + "i4', (2,)),('u1', (3,)),('{e}f4', (4, 2))], "
+- + "'offsets':[0,12,20,24], 'itemsize':56}}"
++ + "i4',(2,)),('u1',(3,)),('{e}f4',(4,2))],"
++ + "'offsets':[0,12,20,24],'itemsize':56}}"
+ ).format(e=e)
+ assert m.print_array_array(arr) == [
+ "a={{A,B,C,D},{K,L,M,N},{U,V,W,X}},b={0,1},"
+
+From 2c4a1e98e56a257fbc8dd0e8644181acd6d7e5a7 Mon Sep 17 00:00:00 2001
+From: "pre-commit-ci[bot]"
+ <66853113+pre-commit-ci[bot]@users.noreply.github.com>
+Date: Thu, 3 Feb 2022 16:45:33 +0000
+Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks
+
+for more information, see https://pre-commit.ci
+---
+ tests/test_numpy_dtypes.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tests/test_numpy_dtypes.py b/tests/test_numpy_dtypes.py
+index 43480334aa..0098eccb87 100644
+--- a/tests/test_numpy_dtypes.py
++++ b/tests/test_numpy_dtypes.py
+@@ -123,7 +123,7 @@ def test_dtype(simple_dtype):
+
+ e = "<" if byteorder == "little" else ">"
+
+- assert [x.replace(' ', '') for x in m.print_dtypes()] == [
++ assert [x.replace(" ", "") for x in m.print_dtypes()] == [
+ simple_dtype_fmt(),
+ packed_dtype_fmt(),
+ "[('a',{}),('b',{})]".format(simple_dtype_fmt(), packed_dtype_fmt()),
+@@ -238,7 +238,7 @@ def test_recarray(simple_dtype, packed_dtype):
+ ]
+
+ arr = m.create_rec_partial(3)
+- assert str(arr.dtype).replace(' ', '') == partial_dtype_fmt()
++ assert str(arr.dtype).replace(" ", "") == partial_dtype_fmt()
+ partial_dtype = arr.dtype
+ assert "" not in arr.dtype.fields
+ assert partial_dtype.itemsize > simple_dtype.itemsize
+@@ -246,7 +246,7 @@ def test_recarray(simple_dtype, packed_dtype):
+ assert_equal(arr, elements, packed_dtype)
+
+ arr = m.create_rec_partial_nested(3)
+- assert str(arr.dtype).replace(' ', '') == partial_nested_fmt()
++ assert str(arr.dtype).replace(" ", "") == partial_nested_fmt()
+ assert "" not in arr.dtype.fields
+ assert "" not in arr.dtype.fields["a"][0].fields
+ assert arr.dtype.itemsize > partial_dtype.itemsize
+@@ -285,7 +285,7 @@ def test_array_array():
+ e = "<" if byteorder == "little" else ">"
+
+ arr = m.create_array_array(3)
+- assert str(arr.dtype).replace(' ', '') == (
++ assert str(arr.dtype).replace(" ", "") == (
+ "{{'names':['a','b','c','d'],"
+ + "'formats':[('S4',(3,)),('"
+ + e
diff --git a/dev-python/pybind11/pybind11-2.9.0.ebuild b/dev-python/pybind11/pybind11-2.9.0.ebuild
index facd2a74653c..6dbfed6ba055 100644
--- a/dev-python/pybind11/pybind11-2.9.0.ebuild
+++ b/dev-python/pybind11/pybind11-2.9.0.ebuild
@@ -12,7 +12,7 @@ SRC_URI="https://github.com/pybind/pybind11/archive/v${PV}.tar.gz -> ${P}.tar.gz
LICENSE="BSD"
SLOT="0"
-KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
RDEPEND="
dev-cpp/eigen:3
diff --git a/dev-python/pybind11/pybind11-2.8.1.ebuild b/dev-python/pybind11/pybind11-2.9.1.ebuild
index 34b65faf8ef3..f93c74dafdd7 100644
--- a/dev-python/pybind11/pybind11-2.8.1.ebuild
+++ b/dev-python/pybind11/pybind11-2.9.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -12,7 +12,7 @@ SRC_URI="https://github.com/pybind/pybind11/archive/v${PV}.tar.gz -> ${P}.tar.gz
LICENSE="BSD"
SLOT="0"
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
RDEPEND="
dev-cpp/eigen:3
@@ -22,8 +22,12 @@ distutils_enable_tests pytest
python_prepare_all() {
export PYBIND11_USE_CMAKE=1
-
cmake_src_prepare
+
+ local PATCHES=(
+ # https://github.com/pybind/pybind11/pull/3682
+ "${FILESDIR}"/${P}-numpy-1.22.patch
+ )
distutils-r1_python_prepare_all
}