Skip to content

Commit 18f7f08

Browse files
11possimYoloSwagBoy
authored andcommitted
STCC-200 replace python with python2, add python to default.ini PATHS (Catrobat#133)
1 parent 7494886 commit 18f7f08

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

config/default.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ code_file_name: project.json
3535

3636
;-------------------------------------------------------------------------------
3737
[PATHS]
38-
38+
python: python2
3939
jython_home: /usr/jython
4040
jython_exec: %(jython_home)s/bin/jython
4141
batik_home: ${LIB_PATH}/batik-1.7

run

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python2
22
# -*- coding: utf-8 -*-
33
#
44
# ScratchToCatrobat: A tool for converting Scratch projects into Catrobat programs.

run_dbg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python2
22
# -*- coding: utf-8 -*-
33
#
44
# ScratchToCatrobat: A tool for converting Scratch projects into Catrobat programs.

run_tests

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python2
22
# -*- coding: utf-8 -*-
33
#
44
# ScratchToCatrobat: A tool for converting Scratch projects into Catrobat programs.

src/scratchtocatrobat/test_main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class MainTest(common_testing.ProjectTestCase):
3737
def __init__(self, *args):
3838
super(MainTest, self).__init__(*args)
3939
self._main_method = main.run_converter
40-
self.base_exec_args = ["python", os.path.join(common.get_project_base_path(), "run")]
40+
self.base_exec_args = [helpers.config.get("PATHS", "python"), os.path.join(common.get_project_base_path(), "run")]
4141

4242
def execute_run_script(self, args, env=None):
4343
if not env:

src/scratchtocatrobat/tools/helpers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def formatted_shell_script_code(content):
293293
gitCount=`/usr/bin/env git rev-list $branchName |wc -l | sed 's/^ *//;s/ *$//'`
294294
buildNumber="$((gitCount + 1))"
295295
296-
/usr/bin/env python - <<EOF
296+
/usr/bin/env python2 - <<EOF
297297
def update_build_number(config_file_name, number):
298298
# TODO: regex...
299299
content = open(config_file_name).read()

web/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python2
22
# ScratchToCatrobat: A tool for converting Scratch projects into Catrobat programs.
33
# Copyright (C) 2013-2017 The Catrobat Team
44
# (<http://developer.catrobat.org/credits>)

web/worker/converterjob.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def run_job(self, args):
7777
assert isinstance(args["outputDir"], (str, unicode))
7878
job_ID, title, image_URL = args["jobID"], args["title"], args["imageURL"]
7979

80-
exec_args = ["/usr/bin/env", "python", CONVERTER_RUN_SCRIPT_PATH,
80+
exec_args = [helpers.config.get("PATHS", "python"), CONVERTER_RUN_SCRIPT_PATH,
8181
args["url"], args["outputDir"], str(args["jobID"]), "--web-mode"]
8282
process = subprocess.Popen(exec_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
8383
yield self.send_job_started_notification(job_ID, title, image_URL)

0 commit comments

Comments
 (0)