Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #64579

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

Date 2014-01-23 08:41 +0100
From lgabiot <laurent.gabiot@gmail.com>
Newsgroups comp.lang.python
Subject Re: Using a static library in a C extension for Python
References <52dfa51e$0$3621$426a74cc@news.free.fr> <lbpij9$rsi$1@dont-email.me> <mailman.5860.1390444399.18130.python-list@python.org>
Message-ID <mailman.5874.1390462872.18130.python-list@python.org> (permalink)

Show all headers | View raw


Le 23/01/14 03:33, Chris Angelico a écrit :
> On Thu, Jan 23, 2014 at 10:00 AM, Christian Gollwitzer <auriocus@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 you plan
>> to pass on the binary to another person.
>> To circumvent this problem, it might be feasable to just install libcairo
>> along with you extension.
>>
>> Then, the exact same version of python must be used on both computers. Since
>> the extension loading mechanism completely relies on the OS dynamic linker,
>> it is not possible to load an extension into a different version of python
>> than it was built for.
>
> If you can tie in with your OS's package manager, that would solve all
> of these problems. You get the OS-supplied Pythom and the OS-supplied
> libcairo; grabbing libcairo-dev (or, on my Debian system,
> libcairo2-dev to go with libcairo2) gets you what you need to build
> your extension; you then might even package your extension the same
> way, and then simply declare dependencies. Can save a HUGE amount of
> trouble.
>
> ChrisA
>

thank you very much for your answer, I'll work on your informations.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


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