Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions docs/Build_ITK_Python_packages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,17 @@ Building ITK Python wheels

Build the ITK Python wheel with the following command::

mkvirtualenv build-itk
pip install -r requirements-dev.txt
python setup.py bdist_wheel
python3 -m venv build-itk
./build-itk/bin/pip install -r requirements-dev.txt
./build-itk/bin/python setup.py bdist_wheel

Efficiently building wheels for different version of python
-----------------------------------------------------------
Build a wheel for a custom version of ITK
-----------------------------------------

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.
To build a wheel for a custom version of ITK, point to your ITK git repository
with the `ITK_SOURCE_DIR` CMake variable::

Here are the steps:

- Build ITKPythonPackage with ITKPythonPackage_BUILD_PYTHON set to OFF

- Build "flavor" of package using::

python setup.py bdist_wheel -- \
./build-itk/bin/python setup.py bdist_wheel -- \
-DITK_SOURCE_DIR:PATH=/path/to/ITKPythonPackage-core-build/ITK

Other CMake variables can also be passed with `-D` after the double dash.