forked from pool/python-python-ptrace
- Update to 0.9.8 * Added Arm 64bit (AArch64) support. * Implemented ``PTRACE_GETREGSET`` and ``PTRACE_SETREGSET`` required on AArch64 and available on Linux. * Issue #66: Fix ``SIGTRAP|0x80`` or ``SIGTRAP`` wait in syscall_state.exit (``PTRACE_O_TRACESYSGOOD``). - Build PEP517 wheels separately in multibuild - Add patchtes for Python 3.12: * python-ptrace-pr81-importlib.patch gh#vstinner/python-ptrace#81 * python-ptrace-pr83-importlib.patch gh#vstinner/python-ptrace#83 OBS-URL: https://build.opensuse.org/request/show/1154445 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-ptrace?expand=0&rev=18
43 lines
1.2 KiB
Diff
43 lines
1.2 KiB
Diff
From 41f5378bbf4bfa75970d5cc3f6615411cff61a6c Mon Sep 17 00:00:00 2001
|
|
From: Stephen Kitt <steve@sk2.org>
|
|
Date: Sun, 10 Dec 2023 19:07:27 +0100
|
|
Subject: [PATCH] Use importlib instead of imp in setup_cptrace.py
|
|
|
|
Signed-off-by: Stephen Kitt <steve@sk2.org>
|
|
---
|
|
setup_cptrace.py | 8 ++++++--
|
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/setup_cptrace.py b/setup_cptrace.py
|
|
index 8de9d01..f06b792 100755
|
|
--- a/setup_cptrace.py
|
|
+++ b/setup_cptrace.py
|
|
@@ -1,5 +1,7 @@
|
|
#!/usr/bin/env python
|
|
|
|
+import importlib.util
|
|
+
|
|
SOURCES = ['cptrace/cptrace.c']
|
|
|
|
CLASSIFIERS = [
|
|
@@ -17,7 +19,6 @@
|
|
|
|
|
|
def main():
|
|
- from imp import load_source
|
|
from os import path
|
|
from sys import argv
|
|
|
|
@@ -29,7 +30,10 @@ def main():
|
|
|
|
cptrace_ext = Extension('cptrace', sources=SOURCES)
|
|
|
|
- cptrace = load_source("version", path.join("cptrace", "version.py"))
|
|
+ cptrace_spec = importlib.util.spec_from_file_location("version",
|
|
+ path.join("cptrace", "version.py"))
|
|
+ cptrace = importlib.util.module_from_spec(cptrace_spec)
|
|
+ cptrace_spec.loader.exec_module(cptrace)
|
|
|
|
install_options = {
|
|
"name": cptrace.PACKAGE,
|