Skip to content

Commit

Permalink
dbt: use python to find its own site-packages directory (#3270)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphire-arches authored Jan 12, 2025
1 parent 877f720 commit 847ffbd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/toolchain/dbtenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,6 @@ dbtenv_main()
export SAVED_PYTHONPATH="${PYTHONPATH:-""}";
export SAVED_PYTHONHOME="${PYTHONHOME:-""}";

export SSL_CERT_FILE="$TOOLCHAIN_ARCH_DIR/python/lib/python3.13/site-packages/certifi/cacert.pem";
export REQUESTS_CA_BUNDLE="$SSL_CERT_FILE";
export PYTHONNOUSERSITE=1;
export PYTHONPATH="$DEFAULT_SCRIPT_PATH/scripts";
export PYTHONHOME=;
Expand All @@ -370,6 +368,9 @@ dbtenv_main()
export TERMINFO_DIRS="$TOOLCHAIN_ARCH_DIR/ncurses/share/terminfo";
fi

export SSL_CERT_FILE=$(python3 -c 'import site; print(site.getsitepackages()[-1])')/certifi/cacert.pem
export REQUESTS_CA_BUNDLE="$SSL_CERT_FILE";

if [ -n "${DBT_DID_UNPACKING}" ]; then
dbtenv_setup_python
fi
Expand Down

0 comments on commit 847ffbd

Please sign in to comment.