summaryrefslogtreecommitdiff
path: root/dev-python/bottleneck
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-05-20 00:02:16 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-05-20 00:02:16 +0100
commit77b275a53383b07b154caa09feb6f4961b206638 (patch)
treebf2b88f1f848dfe69541c3d78aaa35ef22560107 /dev-python/bottleneck
parent9d4810f84de876ec9d0ae03d0d44224500b41188 (diff)
gentoo auto-resync : 20:05:2024 - 00:02:15
Diffstat (limited to 'dev-python/bottleneck')
-rw-r--r--dev-python/bottleneck/Manifest4
-rw-r--r--dev-python/bottleneck/bottleneck-1.3.8-r1.ebuild58
-rw-r--r--dev-python/bottleneck/bottleneck-1.3.8.ebuild2
-rw-r--r--dev-python/bottleneck/files/bottleneck-1.3.8-numpy-2.patch64
4 files changed, 126 insertions, 2 deletions
diff --git a/dev-python/bottleneck/Manifest b/dev-python/bottleneck/Manifest
index 539d2bb5363c..6a883abcee0f 100644
--- a/dev-python/bottleneck/Manifest
+++ b/dev-python/bottleneck/Manifest
@@ -1,3 +1,5 @@
+AUX bottleneck-1.3.8-numpy-2.patch 2279 BLAKE2B 4a2252953a963390a96c2e2ba7d2b86708595aa803d52698728a49f43ba51dc5d8320f38f63e2d766b9dfd1d46bfac6db8e17a3329855fe97e289eb72f9c9c7d SHA512 faf5931418f2744159b23aabe075a4881bb3545a4f89fe56c62fc907fb7371d4963d487e3dbf0c4323c7b2a8ba97327fe568843b53ddefd1bc1906ea817a2a40
DIST Bottleneck-1.3.8.tar.gz 103252 BLAKE2B 1e520e33eaa86b7328d469a8de2f0cacedb401f9dab3686cad40132caa23e77055b71e630fadda9305f3d416e8958e9762053e6d46afba4cf15489db77418b67 SHA512 951a927ce368643e2ccb5154c05381ce9ff17bc703c0bcd85eab547e345601ad82eb1dc85fa16d667753bf3dc9d0296025984dae463a0153944a85a085331a8e
-EBUILD bottleneck-1.3.8.ebuild 907 BLAKE2B cc87824ee2e2068a25dd2596bfc184f4645315ab9837d0ff59772c8cc8f573ed9c98a5bd5ac08762c96cd1c9176e9c2033873901eae57a57158ac4666bbccfd5 SHA512 b1ba16f604bb3d2e6fe6e868b24fbcbb492e39d1058a3aafa5695a971d38a35b58a32466dc12b63079b412b7bbdd3659e2e2ba4b71d75a7ab9dd9ea3e9220fac
+EBUILD bottleneck-1.3.8-r1.ebuild 1166 BLAKE2B 30cc1349c697b842e65fe9be32cd039e345628aa4fddedb0f02d74fe12b07411ffb329ba140ee4ebc46f8b9802719eea4fbb104f06816d75e42eaf5f2ad51aa4 SHA512 34240032999875de1291c367cf015c6cf832d43f756f967695756e00cd8085021f7eeffc06d6a3d8434c65a904555612bee24faf386ee187e0c8fdb84e0f601a
+EBUILD bottleneck-1.3.8.ebuild 903 BLAKE2B 3b6c39cd0cf72c20e81010eacd5a6c90c13847ab6cc5f40f26edbde7877d529f6a93de258250166c06d43fd9d1bce300026817ddf6fa23a1e09f384debf281f6 SHA512 3d12ce680c8336f6c60d40750bd52ace3adcf0bb399aba8985c01939ed2a1d8631647cb8b9c1fe06caf59b038137887a9c19195eb22a4908c085f14240ff1bed
MISC metadata.xml 519 BLAKE2B 5e5e712122fb0bbc898942cbae15c7cf623aa8462257f063f65a06bc9caae6662c373963f0945f99c5fffe01270e2792e8e5d01af93b49a04f5c3c22cd3a30f7 SHA512 55d2c03dedaa48c8f802d1e4d1d7db4e829fe7357b501c3b2955d28da501eae00675b2775ab36d1131cf2ef0a3d037183bde8df4c85e986d81510df4e234b0ae
diff --git a/dev-python/bottleneck/bottleneck-1.3.8-r1.ebuild b/dev-python/bottleneck/bottleneck-1.3.8-r1.ebuild
new file mode 100644
index 000000000000..15e8b079edec
--- /dev/null
+++ b/dev-python/bottleneck/bottleneck-1.3.8-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYPI_NO_NORMALIZE=1
+PYPI_PN=${PN^}
+PYTHON_COMPAT=( python3_{10..13} pypy3 )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Fast NumPy array functions written in C"
+HOMEPAGE="
+ https://github.com/pydata/bottleneck/
+ https://pypi.org/project/Bottleneck/
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
+
+DEPEND="
+ >=dev-python/numpy-1.9.1:=[${PYTHON_USEDEP}]
+"
+RDEPEND="
+ ${DEPEND}
+"
+
+distutils_enable_tests pytest
+
+PATCHES=(
+ # https://github.com/pydata/bottleneck/pull/450
+ "${FILESDIR}/${P}-numpy-2.patch"
+)
+
+src_prepare() {
+ # don't overwrites user's optimization level
+ sed -e '/extra_compile_args=\["-O2"\]/d' -i setup.py || die
+
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ local EPYTEST_DESELECT=()
+ case ${EPYTHON} in
+ pypy3)
+ EPYTEST_DESELECT+=(
+ # GC assumptions?
+ tests/memory_test.py::test_memory_leak
+ )
+ ;;
+ esac
+
+ rm -rf bottleneck || die
+ epytest --pyargs bottleneck
+}
diff --git a/dev-python/bottleneck/bottleneck-1.3.8.ebuild b/dev-python/bottleneck/bottleneck-1.3.8.ebuild
index d0c36fd55989..75a79f5b4de5 100644
--- a/dev-python/bottleneck/bottleneck-1.3.8.ebuild
+++ b/dev-python/bottleneck/bottleneck-1.3.8.ebuild
@@ -19,7 +19,7 @@ HOMEPAGE="
LICENSE="BSD"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
DEPEND="
>=dev-python/numpy-1.9.1:=[${PYTHON_USEDEP}]
diff --git a/dev-python/bottleneck/files/bottleneck-1.3.8-numpy-2.patch b/dev-python/bottleneck/files/bottleneck-1.3.8-numpy-2.patch
new file mode 100644
index 000000000000..153b984f1fe7
--- /dev/null
+++ b/dev-python/bottleneck/files/bottleneck-1.3.8-numpy-2.patch
@@ -0,0 +1,64 @@
+From 787d6daa292ef013efb2ce93f100079457330363 Mon Sep 17 00:00:00 2001
+From: Ben Greiner <code@bnavigator.de>
+Date: Thu, 9 May 2024 20:27:16 +0200
+Subject: [PATCH 3/3] Replace np.array(a, copy=False) with np.asarray(a)
+
+See https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword
+---
+ bottleneck/slow/move.py | 8 ++++----
+ bottleneck/slow/nonreduce_axis.py | 2 +-
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/bottleneck/slow/move.py b/bottleneck/slow/move.py
+index 0aa06f141..76a54a24e 100644
+--- a/bottleneck/slow/move.py
++++ b/bottleneck/slow/move.py
+@@ -52,7 +52,7 @@ def move_argmin(a, window, min_count=None, axis=-1):
+ "Slow move_argmin for unaccelerated dtype"
+
+ def argmin(a, axis):
+- a = np.array(a, copy=False)
++ a = np.asarray(a)
+ flip = [slice(None)] * a.ndim
+ flip[axis] = slice(None, None, -1)
+ a = a[tuple(flip)] # if tie, pick index of rightmost tie
+@@ -78,7 +78,7 @@ def move_argmax(a, window, min_count=None, axis=-1):
+ "Slow move_argmax for unaccelerated dtype"
+
+ def argmax(a, axis):
+- a = np.array(a, copy=False)
++ a = np.asarray(a)
+ flip = [slice(None)] * a.ndim
+ flip[axis] = slice(None, None, -1)
+ a = a[tuple(flip)] # if tie, pick index of rightmost tie
+@@ -115,7 +115,7 @@ def move_rank(a, window, min_count=None, axis=-1):
+
+ def move_func(func, a, window, min_count=None, axis=-1, **kwargs):
+ "Generic moving window function implemented with a python loop."
+- a = np.array(a, copy=False)
++ a = np.asarray(a)
+ if min_count is None:
+ mc = window
+ else:
+@@ -226,7 +226,7 @@ def lastrank(a, axis=-1):
+ -0.5
+
+ """
+- a = np.array(a, copy=False)
++ a = np.asarray(a)
+ ndim = a.ndim
+ if a.size == 0:
+ # At least one dimension has length 0
+diff --git a/bottleneck/slow/nonreduce_axis.py b/bottleneck/slow/nonreduce_axis.py
+index f09dfa739..1dd67529a 100644
+--- a/bottleneck/slow/nonreduce_axis.py
++++ b/bottleneck/slow/nonreduce_axis.py
+@@ -15,7 +15,7 @@ def nanrankdata(a, axis=None):
+
+
+ def _rank(func1d, a, axis):
+- a = np.array(a, copy=False)
++ a = np.asarray(a)
+ if axis is None:
+ a = a.ravel()
+ axis = 0