mantid
mantid copied to clipboard
Rework linux launching scripts to reflect conda
This really is a cleanup of the scripts. It drops support for qt4, removes mention of mantidplot, and allows for taking advantage of conda.
In conda mode: let conda take care of the PYTHONPATH, don't do it in the scripts. This also re-uses CONDA_PREFIX which points at the location of the active environment. This does verify that the conda package is being used from an active conda environment.
In system mode: do what we've always done.
To test:
Run cmake .
and compare the build version, install version, and previous install version of mantidworkbench
and mantidpython
.
There is no associated issue.
This does not require release notes because it should not affect users in any noticeable way.
Reviewer
Please comment on the following (full description):
Code Review
- Is the code of an acceptable quality?
- Does the code conform to the coding standards?
- Are the unit tests small and test the class in isolation?
- If there is GUI work does it follow the GUI standards?
- If there are changes in the release notes then do they describe the changes appropriately?
- Are the release notes saved in a separate file, using Issue or PR number for file name and in the correct location?
Functional Tests
- Do changes function as described? Add comments below that describe the tests performed?
- Do the changes handle unexpected situations, e.g. bad input?
- Has the relevant (user and developer) documentation been added/updated?
Does everything look good? Mark the review as Approve. A member of @mantidproject/gatekeepers
will take care of it.
Real questions: Should the script be split into development is hooked onto CONDA_ENV
and production connected to CONDA_BUILD
? The code needs more work, but I think that is the distinction we need (assuming I understand the variables correctly).
Documenting conversation with @martyngigg. The new logic (for CONDA_BUILD=on
) is
Get install location (current INSTALL_DIR
)
- if it matches
CONDA_PREFIX
then launch mantid as usual - else if
conda
existsconda run -n <conda environment> mantidworkbench $@[*]
- else error out
Variables that are useful for this:
-
CONDA_DEFAULT_ENV
points at the name of the conda environment that is active (e.g.mantid-dev
) -
CONDA_PREFIX
contains the full path of the current conda environment (e.g./opt/anaconda/envs/mantid-dev
)
The RHEL7 build is no longer relevant so it can be ignored when considering whether to gatekeeper this.