[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Linking Python extensions with libpython



On 04/22/2015 02:30 AM, James McCoy wrote:
> On Wed, Apr 22, 2015 at 12:58:38AM +0200, Matthias Klose wrote:
>>  - note that in Debian python extensions aren't usually linked with
>>    -lpythonX.Y. This is done to not depend on multiple python versions
>>    when building an extension for multiple python versions in a single
>>    binary package, but also to not load the shared library.  I don't see
>>    a memory waste here. Of course, the shared library is loaded when
>>    an application is started using an embedded python interpreter (vim).
> 
> Note that this decision prevents a single Vim instance from being able
> to run both Python2 and Python3 code.  For that reason alone, I'd rather
> have extensions linked with -lpythonX.Y.  That would be one step toward
> me being able to enable dynamic loading of language bindings in Vim.

sure, but can't you just have one vim extension linked with the interpreter
which is loaded by default?  In general, applications embedding the python
interpreter should just support one language version, and that should be Python3
at this time. Not sure I like the gdb way to build two versions of the debugger
for different python versions.


Reply to: