From 9657e51cdc660c0d043c181f6a5f300b31c273eb Mon Sep 17 00:00:00 2001 From: Simon Posch Date: Wed, 6 Nov 2019 22:02:05 +0100 Subject: [PATCH] STCC-200 replace python with python2, add python to default.ini PATHS --- config/default.ini | 4 ++-- run | 2 +- run_dbg | 2 +- run_tests | 2 +- src/scratchtocatrobat/test_main.py | 2 +- src/scratchtocatrobat/tools/helpers.py | 2 +- web/main.py | 2 +- web/worker/converterjob.py | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/config/default.ini b/config/default.ini index 427aeaf2..2cad6ced 100755 --- a/config/default.ini +++ b/config/default.ini @@ -4,7 +4,7 @@ name: Scratch2Catrobat Converter short_name: S2CC version: 0.10.0 build_name: Aegean cat -build_number: 995 +build_number: 997-STCC-200_explicit_python2 build_type: S2CC ;------------------------------------------------------------------------------- @@ -35,7 +35,7 @@ code_file_name: project.json ;------------------------------------------------------------------------------- [PATHS] - +python: python2 jython_home: /usr/jython jython_exec: %(jython_home)s/bin/jython batik_home: ${LIB_PATH}/batik-1.7 diff --git a/run b/run index a41426b5..97f76134 100755 --- a/run +++ b/run @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # ScratchToCatrobat: A tool for converting Scratch projects into Catrobat programs. diff --git a/run_dbg b/run_dbg index 2afe40ab..1a8febd7 100755 --- a/run_dbg +++ b/run_dbg @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # ScratchToCatrobat: A tool for converting Scratch projects into Catrobat programs. diff --git a/run_tests b/run_tests index 5346d068..dc5c6f14 100755 --- a/run_tests +++ b/run_tests @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # ScratchToCatrobat: A tool for converting Scratch projects into Catrobat programs. diff --git a/src/scratchtocatrobat/test_main.py b/src/scratchtocatrobat/test_main.py index 1ef48d2d..015dfd29 100644 --- a/src/scratchtocatrobat/test_main.py +++ b/src/scratchtocatrobat/test_main.py @@ -37,7 +37,7 @@ class MainTest(common_testing.ProjectTestCase): def __init__(self, *args): super(MainTest, self).__init__(*args) self._main_method = main.run_converter - self.base_exec_args = ["python", os.path.join(common.get_project_base_path(), "run")] + self.base_exec_args = [helpers.config.get("PATHS", "python"), os.path.join(common.get_project_base_path(), "run")] def execute_run_script(self, args, env=None): if not env: diff --git a/src/scratchtocatrobat/tools/helpers.py b/src/scratchtocatrobat/tools/helpers.py index 703afd9b..d65c7376 100644 --- a/src/scratchtocatrobat/tools/helpers.py +++ b/src/scratchtocatrobat/tools/helpers.py @@ -295,7 +295,7 @@ def formatted_shell_script_code(content): buildNumber="$((gitCount + 1))" buildNumber+="-$simpleBranchName" - /usr/bin/env python - <) diff --git a/web/worker/converterjob.py b/web/worker/converterjob.py index a2a8c155..01f2f440 100644 --- a/web/worker/converterjob.py +++ b/web/worker/converterjob.py @@ -77,7 +77,7 @@ def run_job(self, args): assert isinstance(args["outputDir"], (str, unicode)) job_ID, title, image_URL = args["jobID"], args["title"], args["imageURL"] - exec_args = ["/usr/bin/env", "python", CONVERTER_RUN_SCRIPT_PATH, + exec_args = [helpers.config.get("PATHS", "python"), CONVERTER_RUN_SCRIPT_PATH, args["url"], args["outputDir"], str(args["jobID"]), "--web-mode"] process = subprocess.Popen(exec_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) yield self.send_job_started_notification(job_ID, title, image_URL)