Skip to content

Commit

Permalink
#3849: Clone into src and pip install via a tmp env module
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbillowsMO committed Jan 6, 2025
1 parent d518c48 commit 69ce57d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,15 @@ if [[ -d ${ESMVALCORE_DIR} ]]; then
rm -rf "${ESMVALCORE_DIR}"
fi

# Checkout the specified branch for ESMValCore and ESMValTool. Use the
# Checkout the specified branch for ESMValCore and ESMValTool to a `src` dir. Use the
# quiet ('-q') option to prevent the progress status from being reported
# (which is done via done via 'stderr').
git clone -q -b "${BRANCH}" "${ESMVALTOOL_URL}" "${ESMVALTOOL_DIR}"
git clone -q -b "${BRANCH}" "${ESMVALCORE_URL}" "${ESMVALCORE_DIR}"
git clone -q -b "${BRANCH}" "${ESMVALTOOL_URL}" "${ESMVALTOOL_SOURCE_DIR}"
git clone -q -b "${BRANCH}" "${ESMVALCORE_URL}" "${ESMVALCORE_SOURCE_DIR}"

# Copy ESMValCore and ESMValTool into 'lib/python', adding them to the PYTHONPATH.
# 'pip install' does this and also triggers `setuptools-scm` to increment the
# package version number. Otherwise `version` returns the last tagged
# release, not the current development version.
rtw-env pip install "${ESMVALTOOL_SOURCE_DIR}" --target="${ESMVALTOOL_DIR}" --no-deps
rtw-env pip install "${ESMVALCORE_SOURCE_DIR}" --target="${ESMVALCORE_DIR}" --no-deps
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ default=clone_latest_esmval.sh

[env]
BRANCH=main
[email protected]:ESMValGroup/ESMValCore.git
[email protected]:ESMValGroup/ESMValTool.git
[email protected]:ESMValGroup/ESMValCore.git
ESMVALTOOL_SOURCE_DIR=${CYLC_WORKFLOW_SHARE_DIR}/src/ESMValTool
ESMVALCORE_SOURCE_DIR=${CYLC_WORKFLOW_SHARE_DIR}/src/ESMValCore
ENV_NAME=/home/h02/cbillows/esmvt-rtw-pip

0 comments on commit 69ce57d

Please sign in to comment.