Re: Using a static library in a C extension for Python

2014-01-23 Thread 88888 Dihedral
On Thursday, January 23, 2014 3:22:52 AM UTC+8, lgabiot wrote: Le 22/01/14 18:31, 8 Dihedral a écrit : Check the C source code generated by Pyrex and check cython for what u want, but I did try that out in any mobile phone or flat panel programming.

Using a static library in a C extension for Python

2014-01-22 Thread lgabiot
Hello, working on OS X 10.8.5 Python 2.7 I've written a simple C extension for Python that uses the cairo graphic library. It works well, and I can call it from Python with no problem. The only drawback is that I need to have the cairo library installed on my system (so it seems my extension

Re: Using a static library in a C extension for Python

2014-01-22 Thread 88888 Dihedral
On Wednesday, January 22, 2014 7:01:50 PM UTC+8, lgabiot wrote: Hello, working on OS X 10.8.5 Python 2.7 I've written a simple C extension for Python that uses the cairo graphic library. It works well, and I can call it from Python with no problem. The only drawback is

Re: Using a static library in a C extension for Python

2014-01-22 Thread lgabiot
Le 22/01/14 18:31, 8 Dihedral a écrit : Check the C source code generated by Pyrex and check cython for what u want, but I did try that out in any mobile phone or flat panel programming. Thanks a lot for your answer. I didn't use Pyrex or other tool, but wrote myself the C python

Re: Using a static library in a C extension for Python

2014-01-22 Thread Gregory Ewing
lgabiot wrote: Le 22/01/14 18:31, 8 Dihedral a écrit : Check the C source code generated by Pyrex ... Thanks a lot for your answer. We suspect that 8 Dihedral is actually a bot, so you're *probably* wasting your time attempting to engage it in conversation. -- Greg --

Re: Using a static library in a C extension for Python

2014-01-22 Thread Christian Gollwitzer
Hi, Am 22.01.14 12:01, schrieb lgabiot: Is it possible to link statically cairo to my extension, so that even if cairo is not installed on a computer, the code will run? I guess I would need to modify the setup.py file using distutils to compile cairo statically into my .so file? I've done

Re: Using a static library in a C extension for Python

2014-01-22 Thread lgabiot
Le 22/01/14 23:09, Gregory Ewing a écrit : We suspect that 8 Dihedral is actually a bot, so you're *probably* wasting your time attempting to engage it in conversation. Thanks, so that will be my first real experience of the Turing test!!! --

Re: Using a static library in a C extension for Python

2014-01-22 Thread lgabiot
thanks a lot for your very precise answer! shortly, as I'm running out of time right now: I've got here a lot of informations, so I'll dig in the directions you gave me. It will be a good compiling exercise... (I'm really new at all this). --

Re: Using a static library in a C extension for Python

2014-01-22 Thread Chris Angelico
On Thu, Jan 23, 2014 at 10:00 AM, Christian Gollwitzer aurio...@gmx.de wrote: There might be another issue with the license of the library. Cairo is both LGPL and MPL. For LGPL, only dynamic linking is without doubt, for MPL it seems to be accepted to link statically. It all depends on whether

Re: Using a static library in a C extension for Python

2014-01-22 Thread lgabiot
Le 23/01/14 03:33, Chris Angelico a écrit : On Thu, Jan 23, 2014 at 10:00 AM, Christian Gollwitzer aurio...@gmx.de wrote: There might be another issue with the license of the library. Cairo is both LGPL and MPL. For LGPL, only dynamic linking is without doubt, for MPL it seems to be accepted to