From cf6bcd14ccb3c326550c2c2dcd0644c7935324c6 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Tue, 29 Sep 2020 16:52:37 -0400 Subject: [PATCH 1/2] doc: Update manual wheel building instructions --- docs/Build_ITK_Python_packages.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Build_ITK_Python_packages.rst b/docs/Build_ITK_Python_packages.rst index 20e368fa..611ad12f 100644 --- a/docs/Build_ITK_Python_packages.rst +++ b/docs/Build_ITK_Python_packages.rst @@ -114,9 +114,9 @@ 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 ----------------------------------------------------------- From 866075cdfca5ebca80b282c9a41e4fdd247b6742 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Sat, 28 Nov 2020 20:31:15 -0500 Subject: [PATCH 2/2] doc: Document how to build with a custom version of ITK --- docs/Build_ITK_Python_packages.rst | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/docs/Build_ITK_Python_packages.rst b/docs/Build_ITK_Python_packages.rst index 611ad12f..092abb99 100644 --- a/docs/Build_ITK_Python_packages.rst +++ b/docs/Build_ITK_Python_packages.rst @@ -118,16 +118,13 @@ Build the ITK Python wheel with the following command:: ./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.