Skip to content

Commit

Permalink
Merge pull request #171 from lsst/tickets/DM-37362
Browse files Browse the repository at this point in the history
DM-37362: Add -d option for rubin-env-developer.
  • Loading branch information
ktlim committed Dec 15, 2022
2 parents 88dc87f + 54e6347 commit 6558056
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion nominal.out
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ one of:
or
source "PWD/envconfig" # for lsstsw clones

Individual LSST packages may now be installed with the usual `eups distrib
Individual LSST packages may then be installed with the usual `eups distrib
install` command. For example, to install the latest weekly release of the
LSST Science Pipelines full distribution, use:

Expand Down
20 changes: 16 additions & 4 deletions scripts/lsstinstall
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ usage () {
cat <<EOF
usage: lsstinstall [-n]
[-T EUPS_TAG | -X EUPS_TAG | -v RUBINENV_VERSION]
[-e ENV_NAME] [-u] [-p CONDA_PATH] [-P] [-C CHANNEL] [-E EUPS_URL]
[-B] [-S] [-h]
[-e ENV_NAME] [-u] [-d]
[-p CONDA_PATH] [-P] [-C CHANNEL]
[-E EUPS_URL]
[-B] [-S]
[-h]
Installs the Rubin software conda environment.
Enables the eups distrib install command for Science Pipelines packages.
Expand All @@ -46,6 +49,7 @@ usage: lsstinstall [-n]
-- Specify the environment name to use; if it exists, assume that
it is compatible and should be used.
-u -- Update rubin-env in an existing environment to the latest build.
-d -- Add a compatible rubin-env-developer to rubin-env (5.0.0 and later).
-p CONDA_PATH
-- Specify the path to the conda installation.
If a conda installation already exists there, it will be used.
Expand All @@ -68,7 +72,7 @@ EOF
exit 1
}

while getopts nBST:X:v:e:up:PC:E:bcth opt; do
while getopts nBST:X:v:e:udp:PC:E:bcth opt; do
case "$opt" in
n)
dryrun="echo \$ "
Expand Down Expand Up @@ -103,6 +107,9 @@ while getopts nBST:X:v:e:up:PC:E:bcth opt; do
u)
update="true"
;;
d)
add_developer="true"
;;
p)
conda_path="$OPTARG"
;;
Expand Down Expand Up @@ -308,6 +315,11 @@ else
run_mamba create -y -n "$rubinenv_name" "rubin-env=$rubinenv_version" \
|| fail "Unable to create conda environment ${rubinenv_name}"
fi
if [ "$add_developer" = true ]; then
# Note: doesn't actually fail if rubin-env-developer can't be installed,
# but instead gives a message that an appropriate rubin-env can't be found.
run_mamba install -y -n "$rubinenv_name" --no-update-deps rubin-env-developer
fi

# Activate environment to set EUPS_PATH

Expand Down Expand Up @@ -378,7 +390,7 @@ one of:
or
${source_cmd} "${cwd}/envconfig" # for lsstsw clones
Individual LSST packages may now be installed with the usual \`eups distrib
Individual LSST packages may then be installed with the usual \`eups distrib
install\` command. For example, to install the latest weekly release of the
LSST Science Pipelines full distribution, use:
Expand Down

0 comments on commit 6558056

Please sign in to comment.