[vtkusers] Help building Python wheels for VTK
David Gobbi
david.gobbi at gmail.com
Fri Aug 8 12:07:58 EDT 2014
Okay, I've taken a long look at PEP 427 and I have an inkling of how a
python VTK wheel can be built.
First, a new CMake variable "VTK_BUILD_PYTHON_WHEEL" should be
added, to turn on the wheel-building machinery. When this variable is set,
the following should happen:
1) CMake should build a wheel-compatible vtk module directory,
which will differ from the current vtk python module directory in the
following ways:
1a) The .py files will not be compiled (no .pyc files)
1b) The directory will contain not only the extension modules (i.e.
the .so/.pyd files), but it will also contain all of the VTK runtime
libraries that the extension modules depend on.
1c) CMake will have to set the loader paths in all the shared objects
so that they can find each other.
2) After CMake has built the module, the python wheel-building tools
can hopefully do the rest:
2a) CMake will check that python has the "wheel" installed
2b) the python module directory that CMake built above becomes the
wheel platlib subdir.
2c) "wheel" will create all the other necessary files and create the .whl
I know how to do 1a and 1b, and can look into 1c (CMake should easily
be able to do it for all platforms). I probably won't be able to do
any work on this in the immediate future, though.
- David
More information about the vtkusers
mailing list