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")
?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With