[med-svn] [Git][med-team/snakemake][master] More invocations of "python" in source tree

Steffen Möller (@moeller) gitlab at salsa.debian.org
Tue Oct 19 12:43:33 BST 2021



Steffen Möller pushed to branch master at Debian Med / snakemake


Commits:
75420522 by Steffen Moeller at 2021-10-19T13:42:28+02:00
More invocations of "python" in source tree

- - - - -


1 changed file:

- debian/patches/python2to3.patch


Changes:

=====================================
debian/patches/python2to3.patch
=====================================
@@ -58,3 +58,54 @@ Index: snakemake/tests/test_tibanna/README.md
  export TIBANNA_DEFAULT_STEP_FUNCTION_NAME=tibanna_unicorn_johannes
  snakemake --tibanna --use-conda --configfile=config.json --default-remote-prefix=snakemake-tibanna-test/1
  ```
+Index: snakemake/snakemake/script.py
+===================================================================
+--- snakemake.orig/snakemake/script.py
++++ snakemake/snakemake/script.py
+@@ -544,7 +544,7 @@ class PythonScript(ScriptBase):
+ 
+     def _get_python_version(self):
+         out = self._execute_cmd(
+-            "python -c \"import sys; print('.'.join(map(str, sys.version_info[:2])))\"",
++            "python3 -c \"import sys; print('.'.join(map(str, sys.version_info[:2])))\"",
+             read=True,
+         )
+         return tuple(map(int, out.strip().split(".")))
+@@ -553,7 +553,7 @@ class PythonScript(ScriptBase):
+         py_exec = sys.executable
+         if self.container_img is not None:
+             # use python from image
+-            py_exec = "python"
++            py_exec = "python3"
+         elif self.conda_env is not None or self.env_modules is not None:
+             if self._is_python_env():
+                 py_version = self._get_python_version()
+@@ -562,7 +562,7 @@ class PythonScript(ScriptBase):
+                     if py_version >= MIN_PY_VERSION:
+                         # Python version is new enough, make use of environment
+                         # to execute script
+-                        py_exec = "python"
++                        py_exec = "python3"
+                     else:
+                         logger.warning(
+                             "Environment defines Python "
+Index: snakemake/snakemake/unit_tests/templates/ruletest.py.jinja2
+===================================================================
+--- snakemake.orig/snakemake/unit_tests/templates/ruletest.py.jinja2
++++ snakemake/snakemake/unit_tests/templates/ruletest.py.jinja2
+@@ -26,7 +26,7 @@ def test_{{ ruletest.name }}():
+ 
+         # Run the test job.
+         sp.check_output([
+-            "python",
++            "python3",
+             "-m",
+             "snakemake", 
+             "{{ ruletest.target }}",
+@@ -53,4 +53,4 @@ def test_{{ ruletest.name }}():
+         # To modify this behavior, you can inherit from common.OutputChecker in here
+         # and overwrite the method `compare_files(generated_file, expected_file), 
+         # also see common.py.
+-        common.OutputChecker(data_path, expected_path, workdir).check()
+\ No newline at end of file
++        common.OutputChecker(data_path, expected_path, workdir).check()



View it on GitLab: https://salsa.debian.org/med-team/snakemake/-/commit/754205225f534b1e3e6a3df2fb72b35a59c7e0c3

-- 
View it on GitLab: https://salsa.debian.org/med-team/snakemake/-/commit/754205225f534b1e3e6a3df2fb72b35a59c7e0c3
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/20211019/410193e3/attachment-0001.htm>


More information about the debian-med-commit mailing list