[vtk-developers] Python dll suffix

David Gobbi david.gobbi at gmail.com
Wed May 2 13:19:56 EDT 2012


The "D" stands for .dylib, which is the shared library suffix on OS X.

Originally, the python modules had a ".dll" suffix on Windows and
a ".so" suffix on Linux.  This meant that python modules were really
just shared libraries with a special python "init" function.  As far as
the linker was concerned, there was no difference between a python
module and a shared library.

With OS X, shared libraries end in ".dylib" and python modules end
in ".so", so it was no longer possible to have the python modules
act as both modules, and as link libraries.  This distinction was also
recognized by cmake (though I forget in what version).  Also, on
Windows, python started to require that python modules end in ".pyd"
as of python 2.5.

To support OS X (and later Windows), it was necessary to break the
python wrappers into two parts: one part that is a shared library (the
"D" part, which is a .dylib on OS X, hence the "D"), and another part
that is a python module.

 - David


On Wed, May 2, 2012 at 11:00 AM, Pat Marion <pat.marion at kitware.com> wrote:
> I think the 'D' must stand for Dependency.  It is a bit confusing, because a
> D at the end of library name usually means Debug.
>
> Pat
>
>
> On Wed, May 2, 2012 at 9:31 AM, Jean-Christophe Fillion-Robin
> <jchris.fillionr at kitware.com> wrote:
>>
>> FYI - The oldest commit I found referencing "PythonD" is the following one
>> [1], it explains why there is a separation into a Python and PythonD
>> library.
>>
>> Hth
>> Jc
>>
>> [1] http://vtk.org/gitweb?p=VTK.git;a=commit;h=56ca4f8198
>>
>>
>> On Wed, May 2, 2012 at 9:21 AM, Pat Marion <pat.marion at kitware.com> wrote:
>>>
>>> Hi Andrew,
>>>
>>> For each python module there should be two libraries:
>>>
>>> libvtkCommonCorePythonD.so
>>> vtkCommonCorePython.so
>>>
>>> The second library is the python c extension module (and it's probably in
>>> a different output directory.)  I forget was the 'D' stands for, but it
>>> doesn't mean debug.
>>>
>>> Pat
>>>
>>>
>>> On Tue, May 1, 2012 at 11:30 PM, Andrew Maclean
>>> <andrew.amaclean at gmail.com> wrote:
>>>>
>>>> Hi Marcus,
>>>>    Sorry the last message was garbled.
>>>> I was reviewing the dlls in the windows build of VTK 6.0 and noticed
>>>> that all the python dlls have a D suffix in the release build,
>>>> e.g vtkAMRCorePythonD-6.0.dll, similarly on Linux e.g
>>>> vtkAMRCorePythonD *.so*
>>>>
>>>> I did a quick scan through the CMakeLists.txt files but I can't see
>>>> where D suffix is being added for the release versions.
>>>>
>>>> Is it intentional that these files all have the D suffix for release
>>>> versions?
>>>>
>>>> Regards
>>>>    Andrew
>>>>
>>>> --
>>>> ___________________________________________
>>>> Andrew J. P. Maclean
>>>>
>>>> ___________________________________________
>>>>
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>>>
>>>>
>>>
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>>
>>>
>>
>>
>>
>> --
>> +1 919 869 8849
>>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>



More information about the vtk-developers mailing list