Skip to content
Open
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ os:
- linux
# - osx
julia:
- 0.6
- 0.7
- 1.0
# - nightly
Expand All @@ -29,7 +28,8 @@ git:
# - gfortran

before_script:
- julia --color=yes ci/before_script.jl
- julia --color=yes -e "using Pkg; Pkg.build()"
- cat deps/build.log
# - if [ $TRAVIS_OS_NAME = osx ]; then brew install gcc; fi

script:
Expand Down
124 changes: 124 additions & 0 deletions Manifest.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name = "IPython"
uuid = "18364772-b071-5c00-bfd7-ceeaffab630a"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
38 changes: 38 additions & 0 deletions deps/build.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
if VERSION >= v"0.7.0-"
# Adding Pkg in test/REQUIRE would be an error in 0.6. Using
# Project.toml still has some gotchas. So:
Pkg = Base.require(Base.PkgId(Base.UUID(0x44cfe95a1eb252eab672e2afdf69b78f), "Pkg"))
end

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

if get(ENV, "CONDA_JL_VERSION", "") == "3"
PyCall.conda_add(["python=3.6"])
PyCall.conda_add(["python=3.7"])
end

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(PyCall))), "deps", "build.log"),
String))
end
7 changes: 2 additions & 5 deletions src/convenience.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,12 @@ NOT_INSTALLABLE = (false, "", Nothing)

function condajl_installation(package)
if PyCall.conda && package in conda_packages
args = `install -y -c conda-forge $package`
message = """
Installing $package via Conda.jl
Execute?:
Conda.runconda($args)
Conda.add($package)
"""
install = () -> Conda.runconda(args)
# `Conda.add_channel` overwrites user's ~/.condarc so let's
# not use it.
install = () -> Conda.add(package)
return (true, message, install)
end
return NOT_INSTALLABLE
Expand Down
31 changes: 0 additions & 31 deletions test/install_dependencies.jl

This file was deleted.

19 changes: 0 additions & 19 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
# module TestIPython

if lowercase(get(ENV, "CI", "false")) == "true"
let
if VERSION < v"0.7.0-"
setup_code = ""
else
setup_code = Base.load_path_setup_code()
end
path = joinpath(@__DIR__, "install_dependencies.jl")
code = """
$setup_code
include("$(escape_string(path))")
"""
run(`$(Base.julia_cmd()) -e $code`)
# Run install_dependencies.jl in a separate process since it
# may re-build PyCall. In that case, we need to load
# re-precompiled PyCall and IPython.
end
end

include("preamble.jl")

IPython.envinfo()
Expand Down