-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
install into global ~/.julia/conda directory #126
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ os: | |
- osx | ||
- linux | ||
julia: | ||
- 0.6 | ||
- 0.7 | ||
- 1.0 | ||
- nightly | ||
env: | ||
- CONDA_JL_VERSION="2" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
julia 0.6 | ||
julia 0.7 | ||
Compat 0.62.0 | ||
JSON | ||
VersionParsing |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
environment: | ||
matrix: | ||
- julia_version: 0.6 | ||
- julia_version: 0.7 | ||
- julia_version: 1 | ||
- julia_version: nightly | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
usr/ | ||
deps.jl | ||
!.gitignore |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
using Compat | ||
|
||
const condadir = abspath(homedir(), ".julia", "conda") | ||
const condadeps = joinpath(condadir, "deps.jl") | ||
|
||
module DefaultDeps | ||
using Compat | ||
if isfile("deps.jl") | ||
include("deps.jl") | ||
end | ||
if !isdefined(@__MODULE__, :ROOTENV) | ||
const ROOTENV = abspath(dirname(@__FILE__), "usr") | ||
elseif isfile(Main.condadeps) | ||
include(Main.condadeps) | ||
end | ||
if !isdefined(@__MODULE__, :MINICONDA_VERSION) | ||
const MINICONDA_VERSION = "3" | ||
end | ||
if !isdefined(@__MODULE__, :ROOTENV) | ||
const ROOTENV = joinpath(Main.condadir, MINICONDA_VERSION) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggested There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's still a separate base installation for python 2 and python 3, no? They have completely different miniconda installers. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
end | ||
end | ||
|
||
ROOTENV = get(ENV, "CONDA_JL_HOME", DefaultDeps.ROOTENV) | ||
|
@@ -33,11 +38,11 @@ const ROOTENV = "$(escape_string(ROOTENV))" | |
const MINICONDA_VERSION = "$(escape_string(MINICONDA_VERSION))" | ||
""" | ||
|
||
if !isfile("deps.jl") || read("deps.jl", String) != deps | ||
write("deps.jl", deps) | ||
end | ||
mkpath(condadir) | ||
mkpath(ROOTENV) | ||
|
||
if !isdir(ROOTENV) | ||
# Ensure ROOTENV exists, otherwise prefix(ROOTENV) will throw | ||
mkpath(ROOTENV) | ||
for depsfile in ("deps.jl", condadeps) | ||
if !isfile(depsfile) || read(depsfile, String) != deps | ||
write(depsfile, deps) | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not
joinpath(DEPOT_PATH[1], "conda")
? But maybe it's fine sincejulia
itself hard-codes~/.julia/config/startup.jl
https://github.com/JuliaLang/julia/blob/b519147d60683c3a0ed587925bb7221153b64b65/base/client.jl#L288There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I was following client.jl.