From fcb0e910133287b0c4c701e6e7922f6d961287ae Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Wed, 7 Nov 2018 19:56:25 -0800 Subject: [PATCH] Use PyCall.conda_add to install dependencies in deps/build.jl see: https://github.com/JuliaPy/PyCall.jl/pull/613 --- deps/build.jl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 deps/build.jl diff --git a/deps/build.jl b/deps/build.jl new file mode 100644 index 0000000..2ea0629 --- /dev/null +++ b/deps/build.jl @@ -0,0 +1,27 @@ +in_CI = lowercase(get(ENV, "CI", "false")) == "true" + +if in_CI + # Let PyCall.jl use Python interpreter from Conda.jl + # See: https://github.com/JuliaPy/PyCall.jl + ENV["PYTHON"] = "" + Pkg.build("PyCall") +end + +using PyCall + +packages = ["ipython"] +if in_CI + push!(packages, "pytest") + if get(ENV, "CONDA_JL_VERSION", "") == "2" + # For IPython.testing.globalipapp + push!(packages, "mock") + end +end +PyCall.conda_add(packages) + +if VERSION >= v"0.7.0-" + @info "PyCall/deps/build.log:" + print(read( + joinpath(dirname(dirname(pathof(IPython.PyCall))), "deps", "build.log"), + String)) +end