diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-06-17 00:09:46 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-06-17 00:09:46 +0100 |
commit | 74e526c590f52d24a213e25f77858ae0b34ec2c8 (patch) | |
tree | 0f6f22133ae9cc04958f6df6d39a02d90ffb1aaf /dev-python/blosc | |
parent | 0a3feeaba4dbc58966dccdbbfcd7fb14deef0831 (diff) |
gentoo auto-resync : 17:06:2024 - 00:09:46
Diffstat (limited to 'dev-python/blosc')
-rw-r--r-- | dev-python/blosc/Manifest | 3 | ||||
-rw-r--r-- | dev-python/blosc/blosc-1.11.1.ebuild | 17 | ||||
-rw-r--r-- | dev-python/blosc/files/blosc-1.11.1-numpy-2.patch | 51 |
3 files changed, 68 insertions, 3 deletions
diff --git a/dev-python/blosc/Manifest b/dev-python/blosc/Manifest index 5334886606c2..d8a21b4f6680 100644 --- a/dev-python/blosc/Manifest +++ b/dev-python/blosc/Manifest @@ -1,3 +1,4 @@ +AUX blosc-1.11.1-numpy-2.patch 1832 BLAKE2B 17c3fb3ec945c325f669343bb51a04956656db9895e8cd108c6a4f585c74f1e0e147ce362ded7a7a42d9a530cbd4108b05e27022549eb20bf9864accfe204e90 SHA512 a26c2d5097d78a91a6e1418f0c03e84500400c7ffefe3295a14507656940e0e0bb1cea8b0f706968985c452401939db02d9b6c8f77875afaeee17d1c8bdb56d5 DIST python-blosc-1.11.1.gh.tar.gz 111262 BLAKE2B cb348253a24258d2649ebc0604acbf936b8ccc2b28c42c69da2fee72ddf87eb17a24657bc5d3c0530193a60f482555ce4cc5d168a18d9c2d79a13410d40670bc SHA512 21f8a697a3a902860a6ed72233984cf00c464ec0ddde9842a0c24b1e8e5ec4dd57b872096445a873d162d7529cba5c3666ba2a3ee3f9b1b18107d9636011281c -EBUILD blosc-1.11.1.ebuild 1167 BLAKE2B 4cf59bbe1cd1668f78e4ab3508f865e762bdda15ca5cd772c6c76e7cffa4afd1955171265b94f89eced2433ed13a8c93050e216219ef4bb7730c4c3d313001b5 SHA512 df3d0e276ba234ebea2b977f437c74c67daaed98ad4ae2576e962767bb713842e976284dcdaedeb640688b20fe33a218e9399f9a839ffcd2f1b873377fbe9505 +EBUILD blosc-1.11.1.ebuild 1450 BLAKE2B 8033409e473f5a28b12b0ed43842425f25dba0143cb15df2dc8ea0d672177c4ae3ba0636491240b43752410799fbe22f58095a3da656c4593e66514bec5f85c6 SHA512 41edae443a06e05c904c68b16434ae8b446d2b7c65d7ea4b46008759e35b5231cc5a7e9be462392f7aa4f37a4a300f6877755e5ef135deaf33b7b9979803feef MISC metadata.xml 999 BLAKE2B e8ab94b206c8364bc10de6e57872e6f4264927118269fe74dc040d5fc1c8fae7b3422a62c6d675b47a87168f03eec83a8ea16210bfd1f7e11920ae94844d9546 SHA512 5dec5341aa068659bb74d206ed7ffc96bc47d1128eb48827ec189be38d9112079c37a140dadc6326ba84352ccbeeac453888391920737bbf73153431d8be1720 diff --git a/dev-python/blosc/blosc-1.11.1.ebuild b/dev-python/blosc/blosc-1.11.1.ebuild index a6135a6ca9c4..560554b6dde2 100644 --- a/dev-python/blosc/blosc-1.11.1.ebuild +++ b/dev-python/blosc/blosc-1.11.1.ebuild @@ -5,7 +5,7 @@ EAPI=8 DISTUTILS_EXT=1 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( pypy3 python3_{10..12} ) +PYTHON_COMPAT=( pypy3 python3_{10..13} ) inherit distutils-r1 @@ -22,8 +22,8 @@ SRC_URI=" " S=${WORKDIR}/${MY_P} -SLOT="0" LICENSE="BSD" +SLOT="0" KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux" IUSE="test" RESTRICT="!test? ( test )" @@ -45,11 +45,24 @@ BDEPEND=" DOCS=( ANNOUNCE.rst README.rst RELEASE_NOTES.rst ) +PATCHES=( + # https://github.com/Blosc/python-blosc/pull/329 + "${FILESDIR}/${P}-numpy-2.patch" +) + src_configure() { export USE_SYSTEM_BLOSC=1 export BLOSC_DIR="${EPREFIX}/usr" } +python_compile() { + distutils-r1_python_compile + + # scikit-build is broken and reuses the same build + # https://github.com/scikit-build/scikit-build/issues/633 + rm -r _skbuild || die +} + python_test() { "${EPYTHON}" -m blosc.test -v || die } diff --git a/dev-python/blosc/files/blosc-1.11.1-numpy-2.patch b/dev-python/blosc/files/blosc-1.11.1-numpy-2.patch new file mode 100644 index 000000000000..97010c0a4bf6 --- /dev/null +++ b/dev-python/blosc/files/blosc-1.11.1-numpy-2.patch @@ -0,0 +1,51 @@ +From 4823cb746023821166756322becd3fc242cd0b32 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Sun, 16 Jun 2024 08:59:36 +0200 +Subject: [PATCH] Fix test failures with NumPy 2 + +* Replace deprecated `np.alltrue()` with `np.all()` (available since + NumPy 1.7.0). + +* Cast NumPy boolean to `bool()`, to ensure doctests pass both with + NumPy 2 (using `np.True_`) and NumPy 1 (using plain `True`). +--- + blosc/toplevel.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/blosc/toplevel.py b/blosc/toplevel.py +index ad9c12d..4d2d413 100644 +--- a/blosc/toplevel.py ++++ b/blosc/toplevel.py +@@ -514,7 +514,7 @@ def compress_ptr(address, items, typesize=8, clevel=9, shuffle=blosc.SHUFFLE, + items, np_array.dtype.itemsize) + >>> d = blosc.decompress(c) + >>> np_ans = numpy.fromstring(d, dtype=np_array.dtype) +- >>> (np_array == np_ans).all() ++ >>> bool((np_array == np_ans).all()) + True + + >>> import ctypes +@@ -640,7 +640,7 @@ def decompress_ptr(bytes_like, address): + items, np_array.dtype.itemsize) + >>> np_ans = numpy.empty(items, dtype=np_array.dtype) + >>> nbytes = blosc.decompress_ptr(c, np_ans.__array_interface__['data'][0]) +- >>> (np_array == np_ans).all() ++ >>> bool((np_array == np_ans).all()) + True + >>> nbytes == items * np_array.dtype.itemsize + True +@@ -769,12 +769,12 @@ def unpack_array(packed_array, **kwargs): + >>> len(parray) < a.size*a.itemsize + True + >>> a2 = blosc.unpack_array(parray) +- >>> numpy.alltrue(a == a2) ++ >>> bool(numpy.all(a == a2)) + True + >>> a = numpy.array(['å', 'ç', 'ø']) + >>> parray = blosc.pack_array(a) + >>> a2 = blosc.unpack_array(parray) +- >>> numpy.alltrue(a == a2) ++ >>> bool(numpy.all(a == a2)) + True + """ + |