From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/vigra/files/, media-libs/vigra/
Date: Fri, 14 Jun 2024 07:15:09 +0000 (UTC)	[thread overview]
Message-ID: <1718349269.4f366a4db94378e6baea9f0cbdcc8d40882feda9.sam@gentoo> (raw)
commit:     4f366a4db94378e6baea9f0cbdcc8d40882feda9
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 14 07:13:48 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 14 07:14:29 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f366a4d
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 <AT> gentoo.org>
 .../files/vigra-1.11.1-python3.12-distutils.patch  | 70 ++++++++++++++++++++++
 media-libs/vigra/vigra-1.11.1-r9.ebuild            |  1 +
 2 files changed, 71 insertions(+)
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"
next             reply	other threads:[~2024-06-14  7:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-14  7:15 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-30 15:40 [gentoo-commits] repo/gentoo:master commit in: media-libs/vigra/files/, media-libs/vigra/ Andreas Sturmlechner
2024-05-30 17:14 Andreas Sturmlechner
2020-07-10 21:24 Andreas Sturmlechner
2019-11-27  0:13 Andreas Sturmlechner
2019-04-08 21:15 Andreas Sturmlechner
2018-11-19 20:13 Craig Andrews
2018-06-06 22:04 Andreas Hüttel
2017-02-11 22:03 Andreas Hüttel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox
  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):
  git send-email \
    --in-reply-to=1718349269.4f366a4db94378e6baea9f0cbdcc8d40882feda9.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY
  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
  Be sure your reply has a Subject: header at the top and a blank line
  before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox