Skip to content

Commit 1cdd79c

Browse files
committed
fix build with CondaEnv
1 parent b299fc3 commit 1cdd79c

File tree

6 files changed

+15
-7
lines changed

6 files changed

+15
-7
lines changed

.github/workflows/ci-examples.yml

+1-1
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

+1-1
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

+1-1
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
version: ['1.6', '1.7', '1.8', '1.9', '1.10']
21+
version: ['1.10', '1.11']
2222

2323
steps:
2424
- name: Check event name
@@ -69,7 +69,7 @@ jobs:
6969
strategy:
7070
fail-fast: false
7171
matrix:
72-
version: ['1.6', '1.7', '1.8', '1.9', '1.10']
72+
version: ['1.10', '1.11']
7373

7474
steps:
7575
- name: Run simple test

Project.toml

+1-1
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

+9-1
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 string(get(ENV, "JULIA_CONDAPKG_BACKEND", "conda")) == "Null"
9+
pyexe = PythonCall.python_executable_path()
10+
else
11+
@info "Using $(get(ENV, "JULIA_CONDAPKG_BACKEND", "conda")) 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)