Commit 7e3863ea authored by Owen Arnold's avatar Owen Arnold
Browse files

Further windows fixes

__name__ not main in Workbench
use python.exe not pythonw.exe on windows for reasons not fully understood, but
doesn't work otherwise
parent 32c91118
......@@ -62,7 +62,7 @@ def _do_wfm_stitching_uninstall(python):
_run_subprocess([python, '-m', 'pip', 'uninstall', '-y', 'wfm_stitching'])
_run_subprocess([python, '-m', 'pip', 'uninstall', '-y', 'python-gitlab'])
if __name__ == "__main__":
if __name__ == "__main__" or __name__ == 'mantidqt.widgets.codeeditor.execution':
parser = ArgumentParser(description='Install WFM package http://git.esss.dk/wedel/wfm_sitching')
parser.add_argument('-v', '--version', default=None,
help='Specify the version you wish to use i.e. v0.1.2.')
......@@ -70,10 +70,10 @@ if __name__ == "__main__":
args = parser.parse_args()
interpreter = sys.executable
opt1 = sys.executable
if os.path.exists(opt1):
if os.path.exists(opt1) and not sys.platform == 'win32':
interpreter = opt1
else:
opt2 = os.path.join(os.path.dirname(sys.executable), 'python')
opt2 = os.path.join(os.path.dirname(sys.executable), 'python.exe')
interpreter = opt2
if not os.path.exists(interpreter):
raise RuntimeError("Cannot find interpreter {0} or {1}".format(opt1, opt2))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment