File: python3.patch

package info (click to toggle)
snakemake 7.21.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 25,052 kB
  • sloc: python: 30,995; javascript: 1,290; makefile: 247; sh: 163; ansic: 57; lisp: 9
file content (100 lines) | stat: -rw-r--r-- 4,172 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Description: Use Python 3 in subprocess calls

TODO - are any of the ones in snakemake/script.py:execute_script a problem?

Author: Michael R. Crusoe <michael.crusoe@gmail.com>, Rebecca N. Palmer <rebecca_palmer@zoho.com>
Forwarded: no

--- a/tests/test_delete_all_output/Snakefile
+++ b/tests/test_delete_all_output/Snakefile
@@ -10,9 +10,9 @@ rule delete_all_output:
         """
         echo $PATH
         ls
-        python -m snakemake --cores 1 -s Snakefile_inner all && \
+        python3 -m snakemake --cores 1 -s Snakefile_inner all && \
         rm nothere && \
-        python -m snakemake --cores 1 -s Snakefile_inner --delete-all-output all && \
+        python3 -m snakemake --cores 1 -s Snakefile_inner --delete-all-output all && \
         test -f infile && test ! -f intermediate && test ! -f somedir/final && \
         test ! -d empty_dir && test ! -L dangling && test ! -d full_dir
         """
@@ -21,8 +21,8 @@ rule delete_temp_output:
     output: touch("delete_temp_output")
     shell:
         """
-        python -m snakemake --cores 1 -s Snakefile_inner --notemp temp && \
-        python -m snakemake --cores 1 -s Snakefile_inner --delete-temp-output temp && \
+        python3 -m snakemake --cores 1 -s Snakefile_inner --notemp temp && \
+        python3 -m snakemake --cores 1 -s Snakefile_inner --delete-temp-output temp && \
         test -f infile && test ! -f temp_intermediate && \
         test ! -d temp_empty_dir && test ! -d temp_full_dir && test -f temp_keep
         """
--- a/tests/test_list_untracked/Snakefile
+++ b/tests/test_list_untracked/Snakefile
@@ -2,4 +2,4 @@ shell.executable("bash")
 
 rule run_test:
     output: "leftover_files"
-    shell:  "python -m snakemake -s Snakefile_inner --list-untracked 2> {output}"
+    shell:  "python3 -m snakemake -s Snakefile_inner --list-untracked 2> {output}"
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -1293,7 +1293,7 @@ def test_convert_to_cwl():
     workdir = dpath("test_convert_to_cwl")
     # run(workdir, export_cwl=os.path.join(workdir, "workflow.cwl"))
     shell(
-        "cd {workdir}; PYTHONPATH={src} python -m snakemake --export-cwl workflow.cwl",
+        "cd {workdir}; PYTHONPATH={src} python3 -m snakemake --export-cwl workflow.cwl",
         src=os.getcwd(),
     )
     shell("cd {workdir}; cwltool --singularity workflow.cwl")
@@ -1395,7 +1395,7 @@ def test_filegraph():
         dot_path = dot_path.replace("\\", "/")
 
     # make sure the calls work
-    shell("cd {workdir};python -m snakemake --filegraph > {dot_path}")
+    shell("cd {workdir};python3 -m snakemake --filegraph > {dot_path}")
 
     # make sure the output can be interpreted by dot
     with open(dot_path, "rb") as dot_file, open(pdf_path, "wb") as pdf_file:
@@ -1882,8 +1882,8 @@ def test_github_issue1384():
         shell(
             """
             cd {tmpdir}
-            python -m snakemake --generate-unit-tests
-            pytest -v .tests/unit
+            python3 -m snakemake --generate-unit-tests
+            python3 -m pytest -v .tests/unit
             """
         )
     finally:
--- a/tests/test_profile/Snakefile
+++ b/tests/test_profile/Snakefile
@@ -1,3 +1,3 @@
 rule:
     shell:
-        "python -m snakemake --cores 1 --profile . -s Snakefile.internal"
+        "python3 -m snakemake --cores 1 --profile . -s Snakefile.internal"
--- a/tests/test_linting.py
+++ b/tests/test_linting.py
@@ -18,7 +18,7 @@ def test_lint(lint, case):
         out = (
             sp.check_output(
                 [
-                    "python",
+                    "python3",
                     "-m",
                     "snakemake",
                     "--lint",
--- a/tests/test_tibanna.py
+++ b/tests/test_tibanna.py
@@ -8,7 +8,7 @@ from common import *
 # run tibanna test before any moto-related tests because they apparently render AWS environment variables invalid or uneffective.
 def test_tibanna():
     workdir = dpath("test_tibanna")
-    subprocess.check_call(["python", "cleanup.py"], cwd=workdir)
+    subprocess.check_call(["python3", "cleanup.py"], cwd=workdir)
 
     os.environ["TEST_ENVVAR1"] = "test"
     os.environ["TEST_ENVVAR2"] = "test"