Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #64517
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2014-01-22 09:31 -0800 |
| References | <52dfa51e$0$3621$426a74cc@news.free.fr> |
| Message-ID | <0510fa5b-41aa-4337-9e36-c851bc83426a@googlegroups.com> (permalink) |
| Subject | Re: Using a static library in a C extension for Python |
| From | 88888 Dihedral <dihedral88888@gmail.com> |
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 that I need to have the cairo library installed on > > my system (so it seems my extension calls dynamically the cairo library). > > I believe this because it doesn't work on a system where cairo is not > > installed. > > > > 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? > > > > Or am I completely wrong? > > > > If someone has a hint... > > > > thanks! 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.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Using a static library in a C extension for Python lgabiot <lgabiot@hotmail.com> - 2014-01-22 12:01 +0100
Re: Using a static library in a C extension for Python 88888 Dihedral <dihedral88888@gmail.com> - 2014-01-22 09:31 -0800
Re: Using a static library in a C extension for Python lgabiot <lgabiot@hotmail.com> - 2014-01-22 20:22 +0100
Re: Using a static library in a C extension for Python Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-01-23 11:09 +1300
Re: Using a static library in a C extension for Python lgabiot <lgabiot@hotmail.com> - 2014-01-23 03:12 +0100
Re: Using a static library in a C extension for Python 88888 Dihedral <dihedral88888@gmail.com> - 2014-01-23 04:21 -0800
Re: Using a static library in a C extension for Python Christian Gollwitzer <auriocus@gmx.de> - 2014-01-23 00:00 +0100
Re: Using a static library in a C extension for Python lgabiot <lgabiot@hotmail.com> - 2014-01-23 03:17 +0100
Re: Using a static library in a C extension for Python Chris Angelico <rosuav@gmail.com> - 2014-01-23 13:33 +1100
Re: Using a static library in a C extension for Python lgabiot <lgabiot@hotmail.com> - 2014-01-23 08:41 +0100
Re: Using a static library in a C extension for Python lgabiot <laurent.gabiot@gmail.com> - 2014-01-23 08:41 +0100
csiph-web