Commit b763c1f5 authored by Owen Arnold's avatar Owen Arnold
Browse files

Cleanup and add more options

parent 01b8df06
......@@ -7,9 +7,9 @@ You should run this script inside MantidPlot from the script window, to ensure t
the same python interpreter that Mantid uses. The installation must use the same python interpreter
that mantid uses.
You can install from the command line using the lauch_mantid_plot executable with the xq (execute and quit)
option set, you can also pass a version to installation script, if not provided it will fetch
the latest wfm_stitching package.
You can install from the command line using the lauch_mantid_plot executable with the xq
(execute and quit) option set, you can also pass a version to installation script, if not
provided it will fetch the latest wfm_stitching package.
Example:
......@@ -17,10 +17,10 @@ C:\\MantidInstall\\bin\\launch_mantidplot -x install_wfm_stitching.py
or
C:\\MantidInstall\\bin\\launch_mantidplot -x install_wfm_stitching.py --version 0.1.0
C:\\MantidInstall\\bin\\launch_mantidplot -x install_wfm_stitching.py -v v0.1.0
"""
import subprocess
import argparse
from argparse import ArgumentParser
import os
import sys
......@@ -35,11 +35,16 @@ def do_wfm_stitching_uninstall(python):
subprocess.check_call([python, '-m' 'pip', 'uninstall', '-y', 'wfm-stitching'])
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Install WFM core package from http://git.esss.dk/wedel/wfm_sitching')
parser.add_argument('-v', '--version', default=None, help='optionally specify the version you wish to use i.e. v0.1.2. Defaults to latest version')
parser = ArgumentParser(description='Install WFM package http://git.esss.dk/wedel/wfm_sitching')
parser.add_argument('-v', '--version', default=None,
help='optionally specify the version you wish to use i.e. v0.1.2.'
'Defaults to latest version. Version must match git tag version.')
parser.add_argument('-u', '--uninstall', action='store_true', default=False, help='uninstall any existing wfm-stitching package')
args = parser.parse_args()
interpreter = os.path.join(os.path.dirname(sys.executable), 'python')
if args.uninstall:
if args.version:
print('Warning: version argument is ignored during uninstall')
do_wfm_stitching_uninstall(interpreter)
else:
do_wfm_stitching_install(interpreter, required_version=args.version)
#do_wfm_stitching_uninstall(interpreter)
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