Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simplest way(s) to make a Julia package available to others

Tags:

module

julia

Julia has a packaging system based on Git repositories with specific directories (package skeleton obtained with Pkg.new("MyPackage")), and a METADATA file that list packages and the git servers they can be found on.

Pkg.init() initializes a local Julia installation with the default list of package, but what are the exact steps to write in one's package documentation in order to let prospective users try it out with Pkg.add("MyPackage"); require("MyPackage") ?

like image 395
lgautier Avatar asked Dec 30 '12 16:12

lgautier


1 Answers

Any package source code can be manually placed in .julia/MyPackage. This can be done by unzipping a file, or checking out the package source from its repository manually. Once that is done, require("MyPackge") will work, just as with any official packages.

If you want to get users to try out Pkg.add("MyPackage"), you will need to provide them with your own METADATA repository. Clone the official repository, add your own package as usual. Then and ask users to initialise their julia package installation with Pkg.init("url to metdata git repository"). Once that is done, Pkg.add("MyPackage") will install the package from its own private git repository.

like image 154
aviks Avatar answered Sep 18 '22 14:09

aviks