Skip to content

Commit 1771d8b

Browse files
committed
fix build with CondaEnv
1 parent b299fc3 commit 1771d8b

File tree

6 files changed

+13
-87
lines changed

6 files changed

+13
-87
lines changed

.github/workflows/ci-examples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
python3 -m pip install -U pip
6969
python3 -m pip install "matplotlib<3.9" seiscm colorcet
7070
echo "JULIA_PYTHONCALL_EXE=$(which python3)" >> $GITHUB_ENV
71-
echo "JULIA_CONDAPKG_BACKEND=\"Null\"" >> $GITHUB_ENV
71+
echo "JULIA_CONDAPKG_BACKEND=Null" >> $GITHUB_ENV
7272
echo "PYTHON=$(which python3)" >> $GITHUB_ENV
7373
echo "PYCALL_JL_RUNTIME_PYTHON=$(which python3)" >> $GITHUB_ENV
7474

.github/workflows/ci-op.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
echo "PYTHON=$(which python3)" >> $GITHUB_ENV
102102
echo "PYCALL_JL_RUNTIME_PYTHON=$(which python3)" >> $GITHUB_ENV
103103
echo "JULIA_PYTHONCALL_EXE=$(which python3)" >> $GITHUB_ENV
104-
echo "JULIA_CONDAPKG_BACKEND=\"Null\"" >> $GITHUB_ENV
104+
echo "JULIA_CONDAPKG_BACKEND=Null" >> $GITHUB_ENV
105105
106106
- name: Build JUDI
107107
uses: julia-actions/julia-buildpkg@latest

.github/workflows/deploy_doc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
echo "PYTHON=$(which python3)" >> $GITHUB_ENV
3434
echo "PYCALL_JL_RUNTIME_PYTHON=$(which python3)" >> $GITHUB_ENV
3535
echo "JULIA_PYTHONCALL_EXE=$(which python3)" >> $GITHUB_ENV
36-
echo "JULIA_CONDAPKG_BACKEND=\"Null\"" >> $GITHUB_ENV
36+
echo "JULIA_CONDAPKG_BACKEND=Null" >> $GITHUB_ENV
3737
3838
- name: Build JUDI
3939
uses: julia-actions/julia-buildpkg@latest

.github/workflows/docker-publish.yml

Lines changed: 0 additions & 82 deletions
This file was deleted.

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "JUDI"
22
uuid = "f3b833dc-6b2e-5b9c-b940-873ed6319979"
33
authors = ["Philipp Witte, Mathias Louboutin"]
4-
version = "4.0.0"
4+
version = "4.0.1"
55

66
[deps]
77
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"

deps/build.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@ struct DevitoException <: Exception
55
msg::String
66
end
77

8-
pyexe = PythonCall.python_executable_path()
8+
if PythonCall.C.CondaPkg.backend() == :Null
9+
pyexe = PythonCall.python_executable_path()
10+
else
11+
@info "Using $(PythonCall.C.CondaPkg.backend()) as the CondaPkg backend"
12+
pyexe = PythonCall.C.CondaPkg.withenv() do
13+
condapy = PythonCall.C.CondaPkg.which("python")
14+
return condapy
15+
end
16+
end
917

1018
pk = try
1119
pyimport("pkg_resources")

0 commit comments

Comments
 (0)