Skip to content

Commit fcb0e91

Browse files
committed
Use PyCall.conda_add to install dependencies in deps/build.jl
see: JuliaPy/PyCall.jl#613
1 parent 8803d49 commit fcb0e91

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

deps/build.jl

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
in_CI = lowercase(get(ENV, "CI", "false")) == "true"
2+
3+
if in_CI
4+
# Let PyCall.jl use Python interpreter from Conda.jl
5+
# See: https://github.com/JuliaPy/PyCall.jl
6+
ENV["PYTHON"] = ""
7+
Pkg.build("PyCall")
8+
end
9+
10+
using PyCall
11+
12+
packages = ["ipython"]
13+
if in_CI
14+
push!(packages, "pytest")
15+
if get(ENV, "CONDA_JL_VERSION", "") == "2"
16+
# For IPython.testing.globalipapp
17+
push!(packages, "mock")
18+
end
19+
end
20+
PyCall.conda_add(packages)
21+
22+
if VERSION >= v"0.7.0-"
23+
@info "PyCall/deps/build.log:"
24+
print(read(
25+
joinpath(dirname(dirname(pathof(IPython.PyCall))), "deps", "build.log"),
26+
String))
27+
end

0 commit comments

Comments
 (0)