[vtk-developers] Dropping the "lib" prefix from VTK python modules

Mathieu Malaterre mathieu.malaterre at gmail.com
Tue Dec 8 12:36:00 EST 2009


Hi David,

On Tue, Dec 8, 2009 at 6:27 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> Hi All,
>
> The "lib" prefix on python modules has always aggravated me a bit.  It
> means that when I build my own local VTK classes, I always need to
> have an "if os.name == 'posix':" conditional when I load them into my
> python scripts.
>
> CMake can build the python modules without the prefix, it would be an
> easy thing for me to change.  I could leave a flag in the
> CMakeLists.txt so that people can add the prefix back if their code
> depends on it.  Either that, or the flag could add soft links for
> compatibility e.g. libvtkCommonPython.so -> vtkCommonPython.so with
> internal "init" functions for both module names.
>
> Opinions?

the only case I can think of, is when people create pseudo python/c++
module/library. So the libBLAPython is actually the lib used to create
executable (main function) and at the same time is the lib used when
loaded in python.

Removing the lib prefix might help user in the future understand this
is a private library that can only be loaded from python.

If you ever work on this, could please remove the SONAMing mechanism.
I could never understand why python/java module used the unix
mechanism, while python or java do not rely on them (ie. only provide
a libBLAPython.so not the SOVersion'ed one libBLAPython.so.5.4).

2cts
-- 
Mathieu



More information about the vtk-developers mailing list