Skip to content

Commit 8afbd58

Browse files
committed
Fix a possible bug in exec_find_libpython
The previous code accidentally worked presumably because $PWD was set do deps when running deps/build.jl. Cherry-picked from JuliaPy#595.
1 parent d8aa844 commit 8afbd58

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

deps/build.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ const dlprefix = Compat.Sys.iswindows() ? "" : "lib"
5151
const PYCALL_DEBUG_BUILD = "yes" == get(ENV, "PYCALL_DEBUG_BUILD", "no")
5252

5353
function exec_find_libpython(python::AbstractString, options)
54-
cmd = `$python $(joinpath(@__DIR__, "find_libpython.py")) $options`
54+
# Do not inline `@__DIR__` into the backticks to expand correctly.
55+
# See: https://github.com/JuliaLang/julia/issues/26323
56+
script = joinpath(@__DIR__, "find_libpython.py")
57+
cmd = `$python $script $options`
5558
if PYCALL_DEBUG_BUILD
5659
cmd = `$cmd --verbose`
5760
end

0 commit comments

Comments
 (0)