From 28d12f6c81a493e5a2b864ad630b5472fe5351c1 Mon Sep 17 00:00:00 2001 From: Mark Kittisopikul Date: Tue, 20 Sep 2022 02:23:54 -0400 Subject: [PATCH 1/3] Set JULIA_PYTHONCALL_EXE=`which python` on activate --- recipe/scripts/activate.sh | 6 ++++++ recipe/scripts/deactivate.sh | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/recipe/scripts/activate.sh b/recipe/scripts/activate.sh index 10d9bd55..06a33dde 100644 --- a/recipe/scripts/activate.sh +++ b/recipe/scripts/activate.sh @@ -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=`which python` diff --git a/recipe/scripts/deactivate.sh b/recipe/scripts/deactivate.sh index 5f0107c9..c6eefdaf 100644 --- a/recipe/scripts/deactivate.sh +++ b/recipe/scripts/deactivate.sh @@ -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 @@ -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 @@ -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 From c73d11972d4190a6bd37a9050598de14f04d8754 Mon Sep 17 00:00:00 2001 From: Mark Kittisopikul Date: Tue, 20 Sep 2022 02:25:20 -0400 Subject: [PATCH 2/3] Bump build number --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 0608b87f..2d4163f4 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -24,7 +24,7 @@ source: build: skip: true # [win] - number: 0 + number: 1 features: requirements: From 21fa5a3f6d3f2683cc9beb447bae9e9f722c1ea0 Mon Sep 17 00:00:00 2001 From: Mark Kittisopikul Date: Tue, 20 Sep 2022 02:34:08 -0400 Subject: [PATCH 3/3] Use JULIA_PYTHONCALL_EXE=$CONDA_PREFIX/bin/python --- recipe/scripts/activate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/scripts/activate.sh b/recipe/scripts/activate.sh index 06a33dde..b50bb975 100644 --- a/recipe/scripts/activate.sh +++ b/recipe/scripts/activate.sh @@ -43,4 +43,4 @@ export JULIA_CONDAPKG_EXE=$CONDA_EXE # 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=`which python` +export JULIA_PYTHONCALL_EXE="$CONDA_PREFIX/bin/python"