Skip to content

Commit 5f745bf

Browse files
author
Christopher Doris
committed
hack to fix tests in CI
1 parent 45b8c38 commit 5f745bf

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/cpython/context.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,19 @@ function init_context()
202202
end
203203
end
204204

205+
# HACK: If we are using CondaPkg, prevent child processes from using it by explicitly
206+
# setting the executable. Our tests sometimes fail on Windows because Aqua launches a
207+
# child process which causes CondaPkg to re-resolve (should work out why, I assume it's
208+
# a filesystem timestamp thing) which causes some stdlibs to disappear for a bit.
209+
#
210+
# A better solution may be to use some environment variable to "freeze" CondaPkg in
211+
# child processes.
212+
#
213+
# Only done when CI=true since it's a hack.
214+
if (get(ENV, "CI", "false") == "true") && (CTX.which !== :CondaPkg)
215+
ENV["JULIA_PYTHONCALL_EXE"] = CTX.exe_path::String
216+
end
217+
205218
# Compare libpath with PyCall
206219
@require PyCall="438e738f-606a-5dbb-bf0a-cddfbfd45ab0" init_pycall(PyCall)
207220

0 commit comments

Comments
 (0)