[vtkusers] Help building Python wheels for VTK

Matthew Brett matthew.brett at gmail.com
Fri Aug 8 16:46:09 EDT 2014


Hi,

On Fri, Aug 8, 2014 at 9:15 AM, David E DeMarle
<dave.demarle at kitware.com> wrote:
> Thanks Dave for laying it out.
>
> I'll try and steal some of my cycles too, but they likely won't come until
> the runup to the next release (a month or more from now).
>
> We do 1c for paraview and vtkpython binaries. The exact incantations vary
> per OS. Search for fixup bundle for reference material.
>
>
>
>
> David E DeMarle
> Kitware, Inc.
> R&D Engineer
> 21 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4909
>
>
> On Fri, Aug 8, 2014 at 12:07 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>>
>> 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

Thanks for looking into this - it would be a huge win to be able to do
'pip install vtk'...

If there is anything I can do to help, please let me know,

Cheers,

Matthew


More information about the vtkusers mailing list