Thanks for the reply. Some follow-up questions inline below.
On Wednesday, 10 September 2014 15:57:21 UTC+2, Leah Hanson wrote:
>
> 1) You can try looking at other packages to see the structure.
>
Thanks, I see you mention Cairo below. I'll try to find that on GitHub for
some clues.
>
> Code goes is `src/`
>
Do you mean src/ in the Julia directory, or do you mean the Nemo code
should go in a subdirectory called /src within the git repository?
And test should be a subdirectory of src/ or a separate directory. (I guess
I can look at an example for this.)
> (and you'll need a `Nemo.jl` in there that will be what Julia runs when
> you say `using Nemo`).
>
I do have Nemo.jl, since I read I'd need this. But it is currently empty.
The problem, leading to another question, is that Nemo currently consists
of two large modules called Rings and Fields (Fields uses Rings, but not
vice versa). There will be more such modules in the future.
But I can't find a way for Nemo.jl to import everything from Rings and
Fields and then export all those symbols out to the user if they type say
`using Nemo`. Is there a way to do this without exporting all the symbols
again individually from the Nemo module?
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).
>
Great. I wondered how to make that work. This should be easy to add. It
will just call the two large sets of test functions I currently have.
>
> 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.
>
Ok.
>
> 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`).
>
Ok.
>
> This is enough for people to get your package installed via the Julia
> package manager by running `Pkg.clone("https://github.com/wbhart/nemo")`.
>
Yes, that is all I want for the time being.
>
> 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.
>
Ok.
>
> 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.
>
>
Will do. That is the keyword I needed, thanks.
Bill.
> Best,
> Leah
>
>
>
> On Wed, Sep 10, 2014 at 8:31 AM, Bill Hart <[email protected]
> <javascript:>> 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.
>>
>
>