Skip to content
Snippets Groups Projects

Mnt/create wrappers var

Merged Paul McCarthy requested to merge mnt/create-wrappers-var into master
2 files
+ 16
2
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -94,7 +94,8 @@ def conda(cmd : str, capture_output=True, **kwargs) -> str:
# If FSLDIR is a child env, we won't be able
# to find the conda executable. In this case,
# we have to assume that we can call "conda".
# we have to assume that "conda" is on the
# $PATH, or is defined as a shell function.
candidates = [
op.join(fsldir, 'bin', 'conda'),
op.join(fsldir, 'condabin', 'conda'),
@@ -544,11 +545,19 @@ def install_packages(packages : Sequence[Package], dry_run : bool):
packages = [f'"{p.name}={p.version}"' for p in packages]
cmd = f'install --no-deps -p {fsldir} -y ' + ' '.join(packages)
# We need to set this variable to ensure that
# FSL command wrapper scripts are created in
# $FSLDIR/share/fsl/bin/. See
# $FSLDIR/share/fsl/sbin/createFSLWrapper for
# more details.
env = os.environ.copy()
env['FSL_CREATE_WRAPPER_SCRIPTS'] = 1
print('\nInstalling packages...')
if dry_run:
print(f'Dry run - would execute {cmd}')
else:
conda(cmd, False)
conda(cmd, False, env=env)
def parse_args(argv : Optional[Sequence[str]]) -> argparse.Namespace:
Loading