diff options
author | Sam James <sam@gentoo.org> | 2024-06-14 08:13:48 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-06-14 08:14:29 +0100 |
commit | 4f366a4db94378e6baea9f0cbdcc8d40882feda9 (patch) | |
tree | a23d9ff6e91d5e3cd1a97b0523df4066dd086d99 /media-libs/vigra | |
parent | sci-chemistry/namd: last-rite (diff) | |
download | gentoo-4f366a4db94378e6baea9f0cbdcc8d40882feda9.tar.gz gentoo-4f366a4db94378e6baea9f0cbdcc8d40882feda9.tar.bz2 gentoo-4f366a4db94378e6baea9f0cbdcc8d40882feda9.zip |
media-libs/vigra: further py3.12 fixes
Unfortunately, the CMake still tries to use:
1) nose (???)
2) numpy.distutils
Bug: https://bugs.gentoo.org/929649
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/vigra')
-rw-r--r-- | media-libs/vigra/files/vigra-1.11.1-python3.12-distutils.patch | 70 | ||||
-rw-r--r-- | media-libs/vigra/vigra-1.11.1-r9.ebuild | 1 |
2 files changed, 71 insertions, 0 deletions
diff --git a/media-libs/vigra/files/vigra-1.11.1-python3.12-distutils.patch b/media-libs/vigra/files/vigra-1.11.1-python3.12-distutils.patch new file mode 100644 index 000000000000..7001a2a0217e --- /dev/null +++ b/media-libs/vigra/files/vigra-1.11.1-python3.12-distutils.patch @@ -0,0 +1,70 @@ +https://github.com/ukoethe/vigra/commit/1203cccaed97c276d7c3cf6886730d03f6e8dfc6 + +(But with some edits for more distutils removals & rebase.) + +From 1203cccaed97c276d7c3cf6886730d03f6e8dfc6 Mon Sep 17 00:00:00 2001 +From: Mark Harfouche <mark.harfouche@gmail.com> +Date: Sat, 30 Sep 2023 16:25:08 -0400 +Subject: [PATCH] Do not use distutils since it is deprecated + +--- a/vigranumpy/setup.py.cmake2.in ++++ b/vigranumpy/setup.py.cmake2.in +@@ -1,5 +1,8 @@ +-import distutils, ctypes.util, shutil, os, sys +-from distutils.core import setup ++import ctypes.util ++import shutil ++import os ++import sys ++from setuptools import setup + + # copy the required DLLs to the directory $vigranumpy_tmp_dir/dlls + # if additional libraries are linked dynamically (e.g. tiff, png) +--- a/vigranumpy/setup.py.in ++++ b/vigranumpy/setup.py.in +@@ -1,5 +1,9 @@ +-import distutils, ctypes.util, shutil, os, sys +-from distutils.core import setup ++import ctypes.util ++import shutil ++import os ++import sys ++from setuptools import setup ++ + + # copy the required DLLs to the directory $vigranumpy_tmp_dir/dlls + # if additional libraries are linked dynamically (e.g. tiff, png) + +--- a/config/FindVIGRANUMPY_DEPENDENCIES.cmake ++++ b/config/FindVIGRANUMPY_DEPENDENCIES.cmake +@@ -40,7 +40,7 @@ IF(PYTHONINTERP_FOUND) + # + ###################################################################### + execute_process(COMMAND ${PYTHON_EXECUTABLE} -c +- "from distutils.sysconfig import *; print(get_python_inc())" ++ "import sysconfig; print(sysconfig.get_paths()['include'])" + OUTPUT_VARIABLE PYTHON_INCLUDE OUTPUT_STRIP_TRAILING_WHITESPACE) + SET(PYTHON_INCLUDE_PATH ${PYTHON_INCLUDE} + CACHE PATH "Path to Python include files" +@@ -66,10 +66,10 @@ IF(PYTHONINTERP_FOUND) + set(PYTHON_LIBRARY_NAME python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}) + ELSE() + execute_process(COMMAND ${PYTHON_EXECUTABLE} -c +- "from distutils.sysconfig import *; print(get_config_var('LDLIBRARY'))" ++ "import sysconfig; print(sysconfig.get_config_var('LDLIBRARY'))" + OUTPUT_VARIABLE PYTHON_LIBRARY_NAME OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${PYTHON_EXECUTABLE} -c +- "from distutils.sysconfig import *; print(get_config_var('LIBDIR'))" ++ "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))" + OUTPUT_VARIABLE PYTHON_LIBRARY_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE) + ENDIF() + FIND_LIBRARY(PYTHON_LIBRARIES ${PYTHON_LIBRARY_NAME} HINTS "${PYTHON_LIBRARY_PREFIX}" "${PYTHON_PREFIX}" +@@ -139,7 +139,7 @@ IF(PYTHONINTERP_FOUND) + ###################################################################### + IF(NOT DEFINED VIGRANUMPY_INSTALL_DIR OR VIGRANUMPY_INSTALL_DIR MATCHES "^$") + execute_process(COMMAND ${PYTHON_EXECUTABLE} -c +- "from distutils.sysconfig import *; print(get_python_lib(1))" ++ "import sysconfig; print(sysconfig.get_paths()['purelib'])" + OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE) + FILE(TO_CMAKE_PATH ${PYTHON_SITE_PACKAGES} VIGRANUMPY_INSTALL_DIR) + ENDIF() diff --git a/media-libs/vigra/vigra-1.11.1-r9.ebuild b/media-libs/vigra/vigra-1.11.1-r9.ebuild index 24693904f4da..07f703b229be 100644 --- a/media-libs/vigra/vigra-1.11.1-r9.ebuild +++ b/media-libs/vigra/vigra-1.11.1-r9.ebuild @@ -59,6 +59,7 @@ PATCHES=( "${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 + "${FILESDIR}/${PN}-1.11.1-python3.12-distutils.patch" # bug 929649 # TODO: upstream "${FILESDIR}/${P}-lib_suffix.patch" "${FILESDIR}/${P}-cmake-module-dir.patch" |