Skip to content

Commit

Permalink
If set, cache PYTHONPATH to _PYTHONPATH for Rose to use later
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed Sep 11, 2023
1 parent 37d980c commit 7df4dc2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cylc/flow/etc/cylc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE.
# Copyright (C) NIWA & British Crown (Met Office) & Contributors.
#
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
Expand Down Expand Up @@ -96,6 +96,12 @@ CYLC_HOME_ROOT="${CYLC_HOME_ROOT:-/opt}"
# export ROSE_SITE_CONF_PATH="${ROSE_SITE_CONF_PATH:-/etc/rose}"
###############################################################################

# Prevent user's PyhtonPath interfering with Cylc:
if [[ -n "${PYTHONPATH}" ]]; then
export _PYTHONPATH="${PYTHONPATH}"
unset PYTHONPATH
fi

if [[ -z "${CYLC_HOME}" ]]; then
if [[ -z "${CYLC_ENV_NAME}" ]]; then
if [[ -n "${CYLC_VERSION}" ]]; then
Expand Down

0 comments on commit 7df4dc2

Please sign in to comment.