-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.jl
55 lines (48 loc) · 1.26 KB
/
install.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
using Pkg, Logging
print("Install deps globally (y/n): ")
if readline()[1] == 'y'
deps = String[]
to_rm = []
for name in readdir(@__DIR__)
if name == "false"
continue
end
dir = joinpath(@__DIR__, name)
if isdir(dir) && !startswith(name, ".")
push!(to_rm, name)
# Read Project.toml line by line and extract lines after "[deps]"
to_read = false
for line in eachline(joinpath(dir, "Project.toml"))
if startswith(line, "[deps]")
to_read = true
continue
end
if !to_read
continue
end
push!(deps, split(line, " =")[1])
end
end
end
unique!(deps)
filter!(x -> x ∉ to_rm, deps)
@show deps
Pkg.add(deps)
end
@info "Installing Python dependencies"
run(`pip3 install pymssql`)
for name in readdir(@__DIR__)
if name == "false"
continue
end
dir = joinpath(@__DIR__, name)
if isdir(dir) && !startswith(name, ".")
@info "Installing $(name)"
Pkg.activate(name)
Pkg.update()
Pkg.activate()
Pkg.develop(path=dir)
end
end
Pkg.build()
Pkg.precompile()