Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set JULIA_PYTHONCALL_EXE=$CONDA_PREFIX/bin/python on activate #234

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ source:

build:
skip: true # [win]
number: 0
number: 1
features:

requirements:
Expand Down
6 changes: 6 additions & 0 deletions recipe/scripts/activate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ export JULIA_CONDAPKG_BACKEND_BACKUP=${JULIA_CONDAPKG_BACKEND:-}
export JULIA_CONDAPKG_BACKEND="System"
export JULIA_CONDAPKG_EXE_BACKUP=${JULIA_CONDAPKG_EXE:-}
export JULIA_CONDAPKG_EXE=$CONDA_EXE

# Setup PythonCall.jl
# Use the current Python rather than trying to setup a new conda environment
# https://discourse.julialang.org/t/how-to-use-pythoncall-with-a-previous-conda-environment/87419/8?u=mkitti
export JULIA_PYTHONCALL_EXE_BACKUP=${JULIA_PYTHONCALL_EXE:-}
export JULIA_PYTHONCALL_EXE="$CONDA_PREFIX/bin/python"
5 changes: 5 additions & 0 deletions recipe/scripts/deactivate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export CONDA_JL_HOME=$CONDA_JL_HOME_BACKUP
export CONDA_JL_CONDA_EXE=$CONDA_JL_CONDA_EXE_BACKUP
export JULIA_CONDAPKG_BACKEND=$JULIA_CONDAPKG_BACKEND_BACKUP
export JULIA_CONDAPKG_EXE=$JULIA_CONDAPKG_EXE_BACKUP
export JULIA_PYTHONCALL_EXE=$JULIA_PYTHONCALL_EXE_BACKUP


unset JULIA_DEPOT_PATH_BACKUP
Expand All @@ -18,6 +19,7 @@ unset CONDA_JL_HOME_BACKUP
unset CONDA_JL_CONDA_EXE_BACKUP
unset JULIA_CONDAPKG_BACKEND_BACKUP
unset JULIA_CONDAPKG_EXE_BACKUP
unset JULIA_PYTHONCALL_EXE_BACKUP

if [ -z $JULIA_DEPOT_PATH ]; then
unset JULIA_DEPOT_PATH
Expand All @@ -43,3 +45,6 @@ fi
if [ -z $JULIA_CONDAPKG_BACKEND ]; then
unset JULIA_CONDAPKG_BACKEND
fi
if [ -z $JULIA_PYTHONCALL_EXE ]; then
unset JULIA_PYTHONCALL_EXE
fi