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 <[email protected]> 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 <[email protected]> +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.
_______________________________________________ debian-med-commit mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit
