1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-07-03 19:54:06 +02:00

gnu: python-zeroc-ice-3.6: Fix build on python@3.12.

* gnu/packages/patches/python-zeroc-ice-3.6.5-python-3.12-support.patch:
  Add patch.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/python-xyz.scm (python-zeroc-ice-3.6): Use it.

Merges: https://codeberg.org/guix/guix/pulls/8389
Change-Id: I73d3b981414474d880a82413dcff2fc11ef04d53
Signed-off-by: Nguyễn Gia Phong <cnx@loang.net>
This commit is contained in:
Nicolas Graves
2026-05-06 02:41:31 +02:00
committed by Sharlatan Hellseher
parent 03c8bfc630
commit 68761af76e
3 changed files with 27 additions and 1 deletions
+1
View File
@@ -2138,6 +2138,7 @@ dist_patch_DATA = \
%D%/packages/patches/python-sphinx-prompt-docutils-0.19.patch \
%D%/packages/patches/python-sshtunnel-pep518.patch \
%D%/packages/patches/python-zeroc-ice-3.6.5-python-3.11-support.patch \
%D%/packages/patches/python-zeroc-ice-3.6.5-python-3.12-support.patch \
%D%/packages/patches/python-zipfile2-python-3.12-support.patch \
%D%/packages/patches/qcodeeditor-qt6.patch \
%D%/packages/patches/qtdeclarative-5-disable-qmlcache.patch \
@@ -0,0 +1,24 @@
diff --git a/lib/Ice.py b/lib/Ice.py
--- a/lib/Ice.py
+++ b/lib/Ice.py
@@ -11,7 +11,7 @@
Ice module
"""
-import sys, string, imp, os, threading, warnings, datetime
+import sys, string, importlib, os, threading, warnings, datetime
#
# RTTI problems can occur in C++ code unless we modify Python's dlopen flags.
@@ -373,7 +373,8 @@ def createModule(name):
elif curr in _pendingModules:
mod = _pendingModules[curr]
else:
- nmod = imp.new_module(curr)
+ spec = importlib.util.spec_from_loader(curr, loader=None)
+ nmod = importlib.util.module_from_spec(spec)
_pendingModules[curr] = nmod
mod = nmod
--
+2 -1
View File
@@ -41675,7 +41675,8 @@ interfaces.")
"0mikjfvq26kh8asnn9v55z41pap4c5ypymqnwwi4xkavc3mzyda2"))
(patches
(search-patches
"python-zeroc-ice-3.6.5-python-3.11-support.patch"))))
"python-zeroc-ice-3.6.5-python-3.11-support.patch"
"python-zeroc-ice-3.6.5-python-3.12-support.patch"))))
(arguments
(substitute-keyword-arguments arguments
((#:phases phases #~%standard-phases)