Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ try # make sure deps.jl file is removed on error
error("Python 2.7 or later is required for PyCall")
end

writeifchanged("deps.jl", """
dep_path = get(ENV, "PYCALL_DEPOT", "")

writeifchanged(joinpath(dep_path, "deps.jl"), """
const python = "$(escape_string(python))"
const libpython = "$(escape_string(libpy_name))"
const pyprogramname = "$(escape_string(programname))"
Expand Down
7 changes: 6 additions & 1 deletion src/startup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ end

if !symbols_present
# Python not present. Use deps.jl
const depfile = joinpath(dirname(@__FILE__), "..", "deps", "deps.jl")
const depfile =
if haskey(ENV, "PYCALL_DEPOT")
joinpath(ENV["PYCALL_DEPOT"], "deps.jl")
else
joinpath(dirname(@__FILE__), "..", "deps", "deps.jl")
end
isfile(depfile) || error("PyCall not properly installed. Please run Pkg.build(\"PyCall\")")
include(depfile) # generated by Pkg.build("PyCall")
# Only to be used at top-level - pointer will be invalid after reload
Expand Down