diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2024-05-30 18:18:02 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2024-05-30 19:14:01 +0200 |
commit | 63678ff9b6230c1de8b23260c41a0e3f1ced3234 (patch) | |
tree | 8e41f72d528b2864ba662e96cd1d490b87c269a5 /media-libs/vigra | |
parent | dev-python/pdoc3: fix deprecation warnings, enable py3.12 (diff) | |
download | gentoo-63678ff9b6230c1de8b23260c41a0e3f1ced3234.tar.gz gentoo-63678ff9b6230c1de8b23260c41a0e3f1ced3234.tar.bz2 gentoo-63678ff9b6230c1de8b23260c41a0e3f1ced3234.zip |
media-libs/vigra: Add python3.12
Bug: https://bugs.gentoo.org/929649
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-libs/vigra')
-rw-r--r-- | media-libs/vigra/files/vigra-1.11.2-python3.12-remove-imp.patch | 30 | ||||
-rw-r--r-- | media-libs/vigra/vigra-1.11.1-r9.ebuild | 3 |
2 files changed, 32 insertions, 1 deletions
diff --git a/media-libs/vigra/files/vigra-1.11.2-python3.12-remove-imp.patch b/media-libs/vigra/files/vigra-1.11.2-python3.12-remove-imp.patch new file mode 100644 index 000000000000..a8094c6e7e7d --- /dev/null +++ b/media-libs/vigra/files/vigra-1.11.2-python3.12-remove-imp.patch @@ -0,0 +1,30 @@ +From 4f81ef7ed5128453c049958e496f9638d28bdf76 Mon Sep 17 00:00:00 2001 +From: David Runge <dave@sleepmap.de> +Date: Wed, 13 Mar 2024 16:24:02 +0100 +Subject: [PATCH] Use importlib.reload instead of imp.reload + +The imp module has been deprecated since Python 3.4 and is removed in +Python 3.12. +Replace its use with its replacement in the importlib module. + +Signed-off-by: David Runge <dave@sleepmap.de> +--- + vigranumpy/lib/axistags.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vigranumpy/lib/axistags.py b/vigranumpy/lib/axistags.py +index 5c564ea9..cb5dd193 100644 +--- a/vigranumpy/lib/axistags.py ++++ b/vigranumpy/lib/axistags.py +@@ -241,7 +241,7 @@ def benchmark(expression): + when getitem returns a value, the slowdown is about 3 (due to Python calls) + ''' + import timeit, axistags +- from imp import reload ++ from importlib import reload + reload(axistags) + repetitions = 100000 + t1 = timeit.Timer(expression, +-- +2.44.0 + diff --git a/media-libs/vigra/vigra-1.11.1-r9.ebuild b/media-libs/vigra/vigra-1.11.1-r9.ebuild index 1be44dbdba2c..24693904f4da 100644 --- a/media-libs/vigra/vigra-1.11.1-r9.ebuild +++ b/media-libs/vigra/vigra-1.11.1-r9.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python3_{10..11} ) +PYTHON_COMPAT=( python3_{10..12} ) PYTHON_REQ_USE="threads(+),xml(+)" inherit cmake flag-o-matic python-r1 @@ -58,6 +58,7 @@ PATCHES=( "${FILESDIR}/${P}-boost-python.patch" "${FILESDIR}/${P}-python3.7.patch" # bug 701208 "${FILESDIR}/${P}-gcc-10.patch" # bug 723302 + "${FILESDIR}/${PN}-1.11.2-python3.12-remove-imp.patch" # bug 929649 # TODO: upstream "${FILESDIR}/${P}-lib_suffix.patch" "${FILESDIR}/${P}-cmake-module-dir.patch" |