def do_install(self): """Uses gdebi to run the install """ thisdir = os.path.dirname(__file__) script = os.path.join(thisdir, 'install_conda_mantid.sh') run('%s %s' % (script, self.mantidInstaller))
# Install the found package if options.doInstall: log("Installing package '%s'" % installer.mantidInstaller) try: installer.install() log("Application path " + installer.mantidPlotPath) installer.no_uninstall = False except Exception as err: scriptfailure("Installing failed. " + str(err)) else: installer.no_uninstall = True try: # Keep hold of the version that was run version = run(installer.mantidPlotPath + ' -v') version_tested = open(os.path.join(output_dir, 'version_tested.log'), 'w') if version and len(version) > 0: version_tested.write(version) version_tested.close() except Exception as err: scriptfailure('Version test failed: ' + str(err), installer) try: # Now get the revision number/git commit ID (remove the leading 'g' that isn't part of it) revision = run(installer.mantidPlotPath + ' -r').lstrip('g') revision_tested = open(os.path.join(output_dir, 'revision_tested.log'), 'w') if revision and len(version) > 0: revision_tested.write(revision) revision_tested.close()
installer.no_uninstall = False except Exception,err: scriptfailure("Installing failed. "+str(err)) else: installer.no_uninstall = True # Ensure MANTIDPATH points at this directory so that # the correct properties file is loaded mantidPlotDir = os.path.dirname(installer.mantidPlotPath) log('MantidPlot directory %s' % mantidPlotDir) log('Pointing MANTIDPATH at MantidPlot directory %s' % mantidPlotDir) os.environ["MANTIDPATH"] = mantidPlotDir try: # Keep hold of the version that was run version = run(installer.mantidPlotPath + ' -v') version_tested = open('version_tested.log','w') if version and len(version) > 0: version_tested.write(version) version_tested.close() except Exception, err: scriptfailure('Version test failed: '+str(err), installer) try: # Now get the revision number/git commit ID (remove the leading 'g' that isn't part of it) revision = run(installer.mantidPlotPath + ' -r').lstrip('g') revision_tested = open('revision_tested.log','w') if revision and len(version) > 0: revision_tested.write(revision) revision_tested.close() except Exception, err: