Thanks very much for the information. I might have additional specific questions along the way, but this definitely helps massively for now.
On Wednesday, 10 September 2014 16:26:10 UTC+2, Isaiah wrote: > > > This was what I thought of trying first. But I couldn't figure out how it >> worked out what GitHub repository to associate this with, or whether it >> would try to create one, possibly scrubbing my existing nemo repository on >> GitHub. Obviously I don't want to lose my commit history. > > > For Pkg manager purposes, the association will be created later (when you > register the package). > > It also isn't clear where Julia creates the empty git repository. In the >> current directory? Or in some subdirectory of the Julia source tree? > > > Under `$HOME/.julia/v0.3` (or v0.4 if you are on git master) > > For the most part I can just run configure, make, make install for now and >> set some library paths (if I can figure out what kind of system I am on). > > > There are some macros to help with this: @osx, @linux, @unix (both), and > @windows. There is also a variable called OS_NAME with a platform-specific > value (:Windows, :Linux, etc.) See: > > http://docs.julialang.org/en/release-0.3/manual/calling-c-and-fortran-code/#handling-platform-variations > > > > On Wed, Sep 10, 2014 at 10:18 AM, Bill Hart <[email protected] > <javascript:>> wrote: > >> >> >> On Wednesday, 10 September 2014 15:57:56 UTC+2, Isaiah wrote: >>> >>> Is there documentation somewhere explaining how to do the latter? Or can >>>> someone help me with doing the latter? >>> >>> >>> You could run `Pkg.generate("Nemo")` and then copy and commit (some of) >>> the resulting files in your own Nemo git tree; there aren't very many. >>> >> >> This was what I thought of trying first. But I couldn't figure out how it >> worked out what GitHub repository to associate this with, or whether it >> would try to create one, possibly scrubbing my existing nemo repository on >> GitHub. Obviously I don't want to lose my commit history. >> >> It also isn't clear where Julia creates the empty git repository. In the >> current directory? Or in some subdirectory of the Julia source tree? >> >> >>> 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. >>>> >>> >>> The Pkg manager will look for a file called `MYPKG/deps/build.jl` and >>> run that if it exists. That's just a Julia file, so you can do whatever you >>> want there (shell out, etc.). >>> >> >> Perfect. For the most part I can just run configure, make, make install >> for now and set some library paths (if I can figure out what kind of system >> I am on). >> >> Finding the Julia installation on the system in order to link against the >> gmp/mpfr might be slightly more difficult. >> >> >>> One option is to use the BinDeps package which provides primitives for >>> interacting with various package managers and build systems: >>> >>> https://github.com/JuliaLang/BinDeps.jl >>> >>> A very advanced and fully-developed usage example can be found in the >>> Cairo package, which has Autotools, Apt, Yum, and several other targets: >>> >>> https://github.com/JuliaLang/Cairo.jl/blob/master/deps/build.jl >>> >>> There are a number of other examples to draw from. Hopefully the above >>> links will give you a sense of where to start. I can help out on Linux and >>> Windows (@ihnorton on github). >>> >> >> Thanks. >> >> Bill. >> >> >>> >>> >>> On Wed, Sep 10, 2014 at 9:31 AM, Bill Hart <[email protected]> >>> 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. >>>> >>> >>> >
