Dear sage-devel, In my sage spkg, I have a cython file in which I use sig_check(). For that I need to add the following line at the top of the file:
include "sage/ext/interrupt.pxi" # ctrl-c interrupt block support For cythonizing, I need to provide appropriate include libraries in the setup.py file. It seems that this is not necessary for cython files in the sage library, because I haven't seen anything special in the module_list.py of sage for files using sig_check(). After looking at how sagemanifolds handle its setup.py file, the only way I found to build my spkg without error is to use sage: sage.env.sage_include_directories() ['SAGE_HOME/local/include', 'SAGE_HOME/local/include/python2.7', 'SAGE_HOME/local/lib/python2.7/site-packages/numpy/core/include', 'SAGE_HOME/local/lib/python2.7/site-packages', 'SAGE_HOME/local/lib/python2.7/site-packages/sage/ext'] in the following way: Extension('slabbe.mult_cont_frac', sources = [os.path.join('slabbe','mult_cont_frac.pyx')], include_dirs=sage.env.sage_include_directories()) But this gives me the following warning: slabbe/mult_cont_frac.o slabbe/mult_cont_frac.c:1861:0: warning: "_signals" redefined #define _signals (*__pyx_vp_4sage_3ext_9interrupt_9interrupt__signals) ^ In file included from /Users/slabbe/Applications/sage-review/local/lib/python2.7/site-packages/sage/ext/interrupt/pxi.h:7:0, from slabbe/mult_cont_frac.c:248: /Users/slabbe/Applications/sage-review/local/lib/python2.7/site-packages/sage/ext/interrupt/interrupt_api.h:16:0: note: this is the location of the previous definition #define _signals (*__pyx_api_vp_4sage_3ext_9interrupt_9interrupt__signals) ^ slabbe/mult_cont_frac.c:1862:15: warning: '__pyx_f_4sage_3ext_9interrupt_9interrupt_print_backtrace' defined but not used [-Wunused-variable] static void (*__pyx_f_4sage_3ext_9interrupt_9interrupt_print_backtrace)(void); /*proto*/ ^ slabbe/mult_cont_frac.c:1863:15: warning: '__pyx_f_4sage_3ext_9interrupt_9interrupt__sig_on_interrupt_received' defined but not used [-Wunused-variable] static void (*__pyx_f_4sage_3ext_9interrupt_9interrupt__sig_on_interrupt_received)(void); /*proto*/ ^ slabbe/mult_cont_frac.c:1864:15: warning: '__pyx_f_4sage_3ext_9interrupt_9interrupt__sig_on_recover' defined but not used [-Wunused-variable] static void (*__pyx_f_4sage_3ext_9interrupt_9interrupt__sig_on_recover)(void); /*proto*/ ^ slabbe/mult_cont_frac.c:1865:15: warning: '__pyx_f_4sage_3ext_9interrupt_9interrupt__sig_off_warning' defined but not used [-Wunused-variable] static void (*__pyx_f_4sage_3ext_9interrupt_9interrupt__sig_off_warning)(char const *, int); /*proto*/ ^ What should be the appropriate value for include_dirs? Thanks for your help, Sébastien -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.