1) You can try looking at other packages to see the structure. Code goes is `src/` (and you'll need a `Nemo.jl` in there that will be what Julia runs when you say `using Nemo`). Tests go in the `tests` folder; you should have a file `runtests.jl` in there that runs the tests for your package (if you want Julia's auto-testing stuff to work).
A file named REQUIRE is where any dependencies on other Julia go; it is also where you specify compatible versions of Julia. Every package has one of these, so you can look at them for examples to see the syntax. You probably want a line like `julia 0.3-` if you believe you package works for 0.3 and will work for 0.4, but not in 0.2. Like most OSS projects: license in LICENSE.md, some documentation in README.md. (*.md means a plain text Markdown file; there's flexibility on plain text format/filename here; these are just what's made by default by `Pkg.generate`). This is enough for people to get your package installed via the Julia package manager by running `Pkg.clone("https://github.com/wbhart/nemo")`. Since Pkg.clone will put you package in the "right" place (i.e. where all your other Julia packages are installed), you'll be able to follow the normal package publishing (register with METADATA) instructions. 2) https://github.com/JuliaLang/BinDeps.jl is the package for installing binary dependencies. You should also search this mailing list for past BinDeps questions, as there have been a number of them. Looking at other packages that use BinDeps can also be very helpful; Cairo.jl is an example, but anything that wraps C libraries would probably be helpful. Best, Leah On Wed, Sep 10, 2014 at 8:31 AM, Bill Hart <goodwillh...@googlemail.com> wrote: > Hi, > > I have been writing a new Julia package, which I have called Nemo (it's > essentially a limited computer algebra system). > > I have two specific problems: > > 1) The git and GitHub repository for Nemo already exists, but I haven't > created a Julia Pkg yet. > > https://github.com/wbhart/nemo > > The documentation on creating a Julia Pkg seems to assume you are going to > start with the Pkg then commit code to the git repository that it creates, > not create a git/github project and then add the necessary stuff to turn it > into a Julia package. > > Is there documentation somewhere explaining how to do the latter? Or can > someone help me with doing the latter? > > (I have a couple of small build issues to fix in order for flint to work > on Windows 64 before it will work there. But I will be working on those > right away. I have managed to get it to work with Julia there, just not > hacked the fixes into the flint build system yet. Other than this minor > thing, I am quite ready to publish Nemo as a package right away (well, > apart from a horrible 3x slowdown and excessive memory usage caused by gc, > but I think I've given up on solving that problem for now).) > > 2) Nemo relies on mpir (or GMP), mpfr and flint, which are large external > C/assembly libraries which need to get built or be available to run Nemo. I > understand Julia has its own GMP and MPFR which I can probably link to if > they are recent enough. > > Flint needs to be built when the package is installed. It takes a long > time to build, e.g. 40 minutes or so on Windows, maybe a third of that on > Linux. > > I can't find any documentation explaining where to put the commands in a > Pkg to actually git clone flint, build it, install it and set up paths for > Nemo. Given the complexities of installing flint for the user, I'd like to > have the Julia package manager do this automatically if at all possible. > And I see it does seem to be possible. I just can't figure out how. > > Flint is here: > > https://github.com/wbhart/flint2 > > Can anyone help, or point me in the right direction? > > Bill. >