Skip to content

Commit

Permalink
STCC-200 replace python with python2, add python to default.ini PATHS
Browse files Browse the repository at this point in the history
  • Loading branch information
11possim committed Nov 6, 2019
1 parent 48ab548 commit 9657e51
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions config/default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

;-------------------------------------------------------------------------------
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion run
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion run_dbg
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion run_tests
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/scratchtocatrobat/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/scratchtocatrobat/tools/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def formatted_shell_script_code(content):
buildNumber="$((gitCount + 1))"
buildNumber+="-$simpleBranchName"
/usr/bin/env python - <<EOF
/usr/bin/env python2 - <<EOF
def update_build_number(config_file_name, number):
# TODO: regex...
content = open(config_file_name).read()
Expand Down
2 changes: 1 addition & 1 deletion web/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
# ScratchToCatrobat: A tool for converting Scratch projects into Catrobat programs.
# Copyright (C) 2013-2017 The Catrobat Team
# (<http://developer.catrobat.org/credits>)
Expand Down
2 changes: 1 addition & 1 deletion web/worker/converterjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9657e51

Please # to comment.