Reputation: 14561
I am trying to download and install dependencies for a Julia project that's not in the package registry. It has a manifest and project file. How do I get all of the packages it depends on to download at once using the Julia Package manager?
Upvotes: 10
Views: 3620
Reputation: 6976
git clone https://github.com/RandomUser/Unregistered.jl
pkg> activate Unregistered.jl
pkg> instantiate
Once the package is set up, you can use the package normally. You can load the package:
julia> using Unregistered
Or even run its test suite:
pkg> test
Upvotes: 8
Reputation: 10147
Preparation (optional):
cd
into it.julia --project=.
Now the actual downloading/installing:
pkg> dev --local https://github.com/RandomUser/Unregistered.jl
This will clone the unregistered project into a local subfolder dev/Unregistered
and will install all the required dependencies.
If the unregistered project is a Julia package, you can now simply using Unregistered
. If you want to work on Unregistered.jl
itself you can pkg> activate dev/Unregistered
to work in the project environment.
Upvotes: 1
Reputation: 10147
FWIW, here is a "pure" Julia version of what @David Varela suggested.
After substituting <url-to-project>
and /some/local/path
this "just works" in the REPL or similar:
using Pkg
Pkg.GitTools.clone("<url-to-project>", "/some/local/path")
cd("/some/local/path")
Pkg.activate(".")
Pkg.instantiate()
# Pkg.precompile() # optional
Upvotes: 4