Nathann, I've taken a look at the Cliquer source, as well as your spkg. I'm CC'ing Bjarke Roune and Martin Albrecht, who have been taking a look at this as well, here in Barcelona. I also am sending this to sage-devel, since it is clear we need a second, third, fourth opinion...
It is actually unclear to me how to proceed. Right now, you are copying the source files directly into SAGE_LOCAL/lib (which is bad), and linking the Cython extension directly against those sources (also bad), and letting the Cython build statically link the code in (also bad). I'm not saying this is totally horrible, but it's not the "Sage way" to do things. For one, this means that your Cython extension is the only place Sage is allowed to call cliquer directly. This is also very confusing, given that most other packages follow a somewhat different pattern, and this makes it harder to maintain. The Makefile included with cliquer isn't set up for creating a dynamically linked library. This is the nice way to do things, because we can interface cliquer from multiple places in the Sage library if we wanted to (perhaps some advanced number theory algorithm would benefit from cliquer at some stage, and it would be faster to interface it directly than through another extension). Given how small cliquer actually is, it could also be reasonable to argue that we should just shove the sources in the Sage library itself and hard link it there, insisting that everyone access the functions through the Cython extension. If we want to go the dynamically linked library route (and I think that's the more "proper" way to do things), we need to either set up an autotools build, or use SCons. Given how minimal the code is, SCons is probably better... but this isn't exactly my field of expertise. On trac, I have closed the other two tickets. I think everything should just happen on #6355. This is too small a job to split up over more than one ticket. (Sorry for the conflicting directions, but I think we both agree here). The patches will still be on the other tickets, and there is a lot of good work there, but there is too much confusion... > As the authors were not wise enough to directly use SAGE graph types, > though, I need several lines to convert a graph to their format, and there > is nothing more complicated ;-) Well, this software is three years older than Sage, so... :) > I wanted to make it look a bit better, which should not have been really > difficult, BUT : I do not know how to compile cliquer into a library then > call it through Cython. I even had problems changing the cl.c into cl.h in > the second line, because each time I do so Cython becomes unable to find the > declaration of the functions and I cannot find how to fix it. Generally speaking, library files should go into SAGE_LOCAL/lib somewhere, and header files into SAGE_LOCAL/include somewhere. Then you need to actually map the dependencies and header files in module_list.py (I notice you just referenced the pyx file, which is why Cython could not find anything). The first thing we need to do is figure out the proper way of having Cliquer build a dynamic library. There is another problem, which is that currently, the web page seems to indicate (although not directly) that the code is released under GPLv3. Sage is released under GPLv2+, and linking this in to Sage would invalidate the v2 part of that. This can probably be overcome with an email (since they don't even specify the version on their webpage, they probably haven't thought too much about which version-- maybe it isn't so important to them). Most people are glad to have their code included in Sage, and gladly modify their license to enable this. However, as is we can't make it standard, unless we just write a command-line interface (not optimal at all). Even then, we couldn't make it part of a Windows port, since MSFT doesn't like GPLv3 at all (and I don't blame them). Robert L. Miller http://www.rlmiller.org/ --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---