[med-svn] [Git][med-team/hisat2][master] d/patches/no_imp: add Python3.12 support.
Michael R. Crusoe (@crusoe)
gitlab at salsa.debian.org
Tue Jul 9 11:28:33 BST 2024
Michael R. Crusoe pushed to branch master at Debian Med / hisat2
Commits:
190ff5a5 by Michael R. Crusoe at 2024-07-09T12:26:55+02:00
d/patches/no_imp: add Python3.12 support.
Closes: #1074739
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/no_imp
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+hisat2 (2.2.1-5) unstable; urgency=medium
+
+ * d/patches/no_imp: add Python3.12 support. Closes: #1074739
+
+ -- Michael R. Crusoe <crusoe at debian.org> Tue, 09 Jul 2024 12:26:53 +0200
+
hisat2 (2.2.1-4) unstable; urgency=medium
* Team upload
=====================================
debian/patches/no_imp
=====================================
@@ -0,0 +1,39 @@
+From: Michael R. Crusoe <crusoe at debian.org>
+Subject: Add Python3.12 support by removing use of the "imp" module
+Forwarded: https://github.com/DaehwanKimLab/hisat2/pull/435
+
+Workaround is from https://docs.python.org/3.12/whatsnew/3.12.html#imp
+
+--- hisat2.orig/hisat2-inspect
++++ hisat2/hisat2-inspect
+@@ -21,10 +21,20 @@
+
+
+ import os
+-import imp
++import importlib.util
++import importlib.machinery
+ import inspect
+ import logging
+
++def load_source(modname, filename):
++ loader = importlib.machinery.SourceFileLoader(modname, filename)
++ spec = importlib.util.spec_from_file_location(modname, filename, loader=loader)
++ module = importlib.util.module_from_spec(spec)
++ # The module is always executed and not cached in sys.modules.
++ # Uncomment the following line to cache the module.
++ # sys.modules[module.__name__] = module
++ loader.exec_module(module)
++ return module
+
+ def main():
+ logging.basicConfig(level=logging.ERROR,
+@@ -38,7 +48,7 @@
+ curr_script = os.path.realpath(inspect.getsourcefile(main))
+ ex_path = os.path.dirname(curr_script)
+ inspect_bin_spec = os.path.join(ex_path,inspect_bin_s)
+- bld = imp.load_source('hisat2-build',os.path.join(ex_path,'hisat2-build'))
++ bld = load_source('hisat2-build',os.path.join(ex_path,'hisat2-build'))
+ options,arguments = bld.build_args()
+
+ if '--verbose' in options:
=====================================
debian/patches/series
=====================================
@@ -1,3 +1,4 @@
+no_imp
hardening
reproducibile
fix-freebsd
View it on GitLab: https://salsa.debian.org/med-team/hisat2/-/commit/190ff5a5b4b017bbd57f210bb57e7ff89d79e595
--
This project does not include diff previews in email notifications.
View it on GitLab: https://salsa.debian.org/med-team/hisat2/-/commit/190ff5a5b4b017bbd57f210bb57e7ff89d79e595
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20240709/1ae71c61/attachment-0001.htm>
More information about the debian-med-commit
mailing list