Skip to content

Commit

Permalink
fix build with CondaEnv
Browse files Browse the repository at this point in the history
  • Loading branch information
mloubout committed Nov 1, 2024
1 parent b299fc3 commit 82e9008
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 87 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
python3 -m pip install -U pip
python3 -m pip install "matplotlib<3.9" seiscm colorcet
echo "JULIA_PYTHONCALL_EXE=$(which python3)" >> $GITHUB_ENV
echo "JULIA_CONDAPKG_BACKEND=\"Null\"" >> $GITHUB_ENV
echo 'JULIA_CONDAPKG_BACKEND="Null"' >> $GITHUB_ENV
echo "PYTHON=$(which python3)" >> $GITHUB_ENV
echo "PYCALL_JL_RUNTIME_PYTHON=$(which python3)" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-op.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
echo "PYTHON=$(which python3)" >> $GITHUB_ENV
echo "PYCALL_JL_RUNTIME_PYTHON=$(which python3)" >> $GITHUB_ENV
echo "JULIA_PYTHONCALL_EXE=$(which python3)" >> $GITHUB_ENV
echo "JULIA_CONDAPKG_BACKEND=\"Null\"" >> $GITHUB_ENV
echo 'JULIA_CONDAPKG_BACKEND="Null"' >> $GITHUB_ENV
- name: Build JUDI
uses: julia-actions/julia-buildpkg@latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
echo "PYTHON=$(which python3)" >> $GITHUB_ENV
echo "PYCALL_JL_RUNTIME_PYTHON=$(which python3)" >> $GITHUB_ENV
echo "JULIA_PYTHONCALL_EXE=$(which python3)" >> $GITHUB_ENV
echo "JULIA_CONDAPKG_BACKEND=\"Null\"" >> $GITHUB_ENV
echo 'JULIA_CONDAPKG_BACKEND="Null"' >> $GITHUB_ENV
- name: Build JUDI
uses: julia-actions/julia-buildpkg@latest
Expand Down
82 changes: 0 additions & 82 deletions .github/workflows/docker-publish.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "JUDI"
uuid = "f3b833dc-6b2e-5b9c-b940-873ed6319979"
authors = ["Philipp Witte, Mathias Louboutin"]
version = "4.0.0"
version = "4.0.1"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Expand Down
10 changes: 9 additions & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@ struct DevitoException <: Exception
msg::String
end

pyexe = PythonCall.python_executable_path()
if string(get(ENV, "JULIA_CONDAPKG_BACKEND", "conda")) == "Null"
pyexe = PythonCall.python_executable_path()
else
@info "Using $(get(ENV, "JULIA_CONDAPKG_BACKEND", "conda")) as the CondaPkg backend"
pyexe = PythonCall.C.CondaPkg.withenv() do
condapy = PythonCall.C.CondaPkg.which("python")
return condapy
end
end

pk = try
pyimport("pkg_resources")
Expand Down

0 comments on commit 82e9008

Please sign in to comment.