Hi Charles,

On Thu, 20 Dec 2012 12:37:33 +0100
Charles Bouillaguet <charles.bouillag...@gmail.com> wrote:

> I (amongst with others) have written a library that solves boolean 
> equations in some way. I wanted to include it as an experimental
> spkg. I thus wrote a cython interface to Sage. To be usable from
> inside Sage, both the library itself and the cython interface are
> necessary. What is the proper way to do this ?
> 
> I first thought that the Right Way (r) was to conditionally include
> the cython part to the library when the spkg is installed, by writing 
> something like this in module_list.py :
> 
> if is_package_installed('stuff'):
>          ext_modules.extend([ blablabla ])
> 
> 
> This works fine, except that it forces potential users to not only 
> install an spkg but also run sage -b, and it apparently makes it 
> impossible to update the reference manual: if I add a line
> 
>     sage/libs/stuff
> 
> to libs.rst, then building the reference manual fails when the spkg
> is not installed.
> 
> What should I do ? Unconditionally include the cython interface to
> the sage library, and mark all doctests as optional ?

Can you compile the Cython interface without the header files installed
by your package?


I assume the Cython interface needs to be changed whenever you update
your library. Which Sage version is used with an experimental package
cannot be controlled, since Sage just grabs the latest version available
at install time. Hence, if you keep the interface separate from
the spkg, you will run into many incompatibility issues.

Wouldn't it be easier to include the Cython interface in the package?
AFAIK, Cython's build system improved significantly and there is no
reason to use Sage's build system for a Cython module.


Cheers,
Burcin

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
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.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.


Reply via email to