This project provides a setup.py
script that build ITK Python wheel. ITK is an open-source,
cross-platform system that provides developers with an extensive suite of software tools for image analysis.
Steps required to build wheels on Linux, MacOSX and Windows have been automated. The following sections outline how to use the associated scripts.
On any linux distribution with docker
and bash
installed, running the script
dockcross-manylinux-build-wheels.sh
will create 64-bit wheels for both
python 2.x and python 3.x in the dist
directory.
For example:
$ git clone git://github.com/InsightSoftwareConsortium/ITKPythonPackage.git
[...]
$ ./scripts/dockcross-manylinux-build-wheels.sh
[...]
$ ls -1 dist/
ITK-0.11.0-cp27-cp27m-manylinux1_x86_64.whl
ITK-0.11.0-cp27-cp27mu-manylinux1_x86_64.whl
ITK-0.11.0-cp33-cp33m-manylinux1_x86_64.whl
ITK-0.11.0-cp34-cp34m-manylinux1_x86_64.whl
ITK-0.11.0-cp35-cp35m-manylinux1_x86_64.whl
ITK-0.11.0-cp36-cp36m-manylinux1_x86_64.whl
To be documented
To be documented
Building wheels requires:
- CMake
- Git
- C++ Compiler - Platform specific requirements are summarized in scikit-build documentation.
- Python
Build the ITK Python wheel with the following command:
mkvirtualenv build-itk
pip install -r requirements-dev.txt
python setup.py bdist_wheel
If on a given platform you would like to build wheels for different version of python, you can download and build the ITK components independent from python first and reuse them when building each wheel.
Here are the steps:
-
Build
ITKPythonPackage
withITKPythonPackage_BUILD_PYTHON
set toOFF
-
Build "flavor" of package using:
python setup.py bdist_wheel -- \
-DITK_SOURCE_DIR:PATH=/path/to/ITKPythonPackage-core-build/ITK-source
Written by Jean-Christophe Fillion-Robin and Matt McCormick from Kitware Inc.
It is covered by the Apache License, Version 2.0:
http://www.apache.org/licenses/LICENSE-2.0
For more information about ITK, visit http://itk.org