Skip to content

Commit efb8865

Browse files
committed
Merge branch 'master' into release
2 parents cdfeb62 + 302dc73 commit efb8865

12 files changed

+56
-28
lines changed

CMakeLists.txt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ if(ITKPythonPackage_SUPERBUILD)
8989

9090
set(ITK_REPOSITORY "https://github.com/InsightSoftwareConsortium/ITK.git")
9191

92-
# ITK master 2022-09-20
93-
set(ITK_GIT_TAG "171fb2ba33a87041f99328a2f26612ff33aa9cc8")
92+
# ITK master 2022-11-11
93+
set(ITK_GIT_TAG "abf5fa10522a36bc51f42f20f426a622f42ed90d")
9494

9595
#-----------------------------------------------------------------------------
9696
# A separate project is used to download ITK, so that it can reused
@@ -105,6 +105,15 @@ if(ITKPythonPackage_SUPERBUILD)
105105
endif()
106106

107107
if(ITKPythonPackage_USE_TBB)
108+
109+
set(tbb_cmake_cache_args)
110+
if(CMAKE_OSX_DEPLOYMENT_TARGET)
111+
list(APPEND tbb_cmake_cache_args
112+
-DCMAKE_CXX_OSX_DEPLOYMENT_TARGET_FLAG:STRING="-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}"
113+
-DCMAKE_C_OSX_DEPLOYMENT_TARGET_FLAG:STRING="-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}"
114+
)
115+
endif()
116+
108117
ExternalProject_add(oneTBB
109118
URL https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.3.0.tar.gz
110119
URL_HASH SHA256=8f616561603695bbb83871875d2c6051ea28f8187dbe59299961369904d1d49e
@@ -114,6 +123,7 @@ if(ITKPythonPackage_SUPERBUILD)
114123
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_BINARY_DIR}/../oneTBB-prefix
115124
-DCMAKE_INSTALL_LIBDIR:STRING=lib # Skip default initialization by GNUInstallDirs CMake module
116125
${ep_common_cmake_cache_args}
126+
${tbb_cmake_cache_args}
117127
-DCMAKE_BUILD_TYPE:STRING=Release
118128
BUILD_BYPRODUCTS "${TBB_DIR}/TBBConfig.cmake"
119129
USES_TERMINAL_DOWNLOAD 1

itkVersion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = '5.3rc04.post3'
1+
VERSION = '5.3rc04.post4'
22

33
def get_versions():
44
"""Returns versions for the ITK Python package.

scripts/dockcross-manylinux-build-module-wheels.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#
1919

2020
MANYLINUX_VERSION=_2_28
21-
IMAGE_TAG=20220715-9ce3707
21+
IMAGE_TAG=20221108-102ebcc
2222

2323
# Generate dockcross scripts
2424
docker run --rm dockcross/manylinux${MANYLINUX_VERSION}-x64:${IMAGE_TAG} > /tmp/dockcross-manylinux-x64

scripts/dockcross-manylinux-build-wheels.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# scripts/dockcross-manylinux-build-wheels.sh cp39
99

1010
MANYLINUX_VERSION=_2_28
11-
IMAGE_TAG=20220715-9ce3707
11+
IMAGE_TAG=20221108-102ebcc
1212

1313
# Generate dockcross scripts
1414
docker run --rm dockcross/manylinux${MANYLINUX_VERSION}-x64:${IMAGE_TAG} > /tmp/dockcross-manylinux-x64

scripts/internal/manylinux-build-common.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if [[ $# -eq 0 ]]; then
1212
PYBIN=(/opt/python/*/bin)
1313
PYBINARIES=()
1414
for version in "${PYBIN[@]}"; do
15-
if [[ ${version} == *"cp37"* || ${version} == *"cp38"* || ${version} == *"cp39"* || ${version} == *"cp310"* ]]; then
15+
if [[ ${version} == *"cp37"* || ${version} == *"cp38"* || ${version} == *"cp39"* || ${version} == *"cp310"* || ${version} == *"cp311" ]]; then
1616
PYBINARIES+=(${version})
1717
fi
1818
done
@@ -70,7 +70,7 @@ case $(uname -m) in
7070
esac
7171
if ! type ninja > /dev/null 2>&1; then
7272
if test ! -d ninja; then
73-
git clone git://github.com/ninja-build/ninja.git
73+
git clone https://github.com/ninja-build/ninja.git
7474
fi
7575
pushd ninja
7676
git checkout release

scripts/internal/manylinux-build-module-wheels.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ for PYBIN in "${PYBINARIES[@]}"; do
9797
-DWRAP_ITK_INSTALL_COMPONENT_IDENTIFIER:STRING=PythonWheel \
9898
-DSWIG_EXECUTABLE:FILEPATH=${itk_build_dir}/Wrapping/Generators/SwigInterface/swig/bin/swig \
9999
-DCMAKE_CXX_COMPILER_TARGET:STRING=$(uname -m)-linux-gnu \
100+
-DCMAKE_INSTALL_LIBDIR:STRING=lib \
100101
-DBUILD_TESTING:BOOL=OFF \
101102
-DPython3_EXECUTABLE:FILEPATH=${Python3_EXECUTABLE} \
102103
-DPython3_INCLUDE_DIR:PATH=${Python3_INCLUDE_DIR} \

scripts/internal/windows_build_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55
import shutil
66

7-
DEFAULT_PY_ENVS = ["37-x64", "38-x64", "39-x64", "310-x64"]
7+
DEFAULT_PY_ENVS = ["37-x64", "38-x64", "39-x64", "310-x64", "311-x64"]
88

99
SCRIPT_DIR = os.path.dirname(__file__)
1010
ROOT_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, "..", ".."))

scripts/macpython-build-common.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ usage()
1616
macpython-build-common
1717
[ -h | --help ] show usage
1818
[ -c | --cmake_options ] space-separated string of CMake options to forward to the module (e.g. \"-DBUILD_TESTING=OFF\")
19-
[ -- python_versions ] build wheel for a specific python version(s). (e.g. -- cp39 cp310)"
19+
[ -- python_versions ] build wheel for a specific python version(s). (e.g. -- 3.9 3.10)"
2020
exit 2
2121
}
2222

@@ -49,7 +49,7 @@ PYTHON_VERSIONS=$(xargs <<< "${PYTHON_VERSIONS}")
4949
# Versions can be restricted by passing them in as arguments to the script
5050
# For example,
5151
# macpython-build-wheels.sh 3.9
52-
if [[ -n "${PYTHON_VERSIONS}" ]]; then
52+
if [[ -z "${PYTHON_VERSIONS}" ]]; then
5353
PYBINARIES=(${MACPYTHON_PY_PREFIX}/*)
5454
else
5555
PYBINARIES=()

scripts/macpython-build-module-wheels.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ for VENV in "${VENVS[@]}"; do
5656
osx_arch="x86_64"
5757
build_path="${SCRIPT_DIR}/../ITK-${py_mm}-macosx_x86_64"
5858
fi
59+
if [[ ! -z "${MACOSX_DEPLOYMENT_TARGET}" ]]; then
60+
osx_target="${MACOSX_DEPLOYMENT_TARGET}"
61+
fi
5962

6063
if [[ -e $PWD/requirements-dev.txt ]]; then
6164
${Python3_EXECUTABLE} -m pip install --upgrade -r $PWD/requirements-dev.txt
@@ -64,6 +67,7 @@ for VENV in "${VENVS[@]}"; do
6467
${Python3_EXECUTABLE} setup.py bdist_wheel --build-type Release --plat-name ${plat_name} -G Ninja -- \
6568
-DCMAKE_MAKE_PROGRAM:FILEPATH=${NINJA_EXECUTABLE} \
6669
-DITK_DIR:PATH=${itk_build_path} \
70+
-DCMAKE_INSTALL_LIBDIR:STRING=lib \
6771
-DITK_USE_SYSTEM_SWIG:BOOL=ON \
6872
-DWRAP_ITK_INSTALL_COMPONENT_IDENTIFIER:STRING=PythonWheel \
6973
-DSWIG_EXECUTABLE:FILEPATH=${itk_build_path}/Wrapping/Generators/SwigInterface/swig/bin/swig \

scripts/macpython-build-wheels.sh

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# For example,
1414
#
1515
# export DYLD_LIBRARY_PATH="/path/to/libs"
16-
# scripts/macpython-build-module-wheels.sh cp39
16+
# scripts/macpython-build-module-wheels.sh 3.9
1717
#
1818

1919
# -----------------------------------------------------------------------
@@ -50,11 +50,18 @@ DELOCATE_LISTDEPS=${VENV}/bin/delocate-listdeps
5050
DELOCATE_WHEEL=${VENV}/bin/delocate-wheel
5151
DELOCATE_PATCH=${VENV}/bin/delocate-patch
5252

53+
build_type="Release"
54+
5355
if [[ $(arch) == "arm64" ]]; then
56+
osx_target="11.0"
57+
osx_arch="arm64"
5458
use_tbb="OFF"
5559
else
60+
osx_target="10.9"
61+
osx_arch="x86_64"
5662
use_tbb="ON"
5763
fi
64+
5865
# Build standalone project and populate archive cache
5966
tbb_dir=$PWD/oneTBB-prefix/lib/cmake/TBB
6067
# So delocate can find the libs
@@ -64,7 +71,10 @@ pushd ITK-source > /dev/null 2>&1
6471
${CMAKE_EXECUTABLE} -DITKPythonPackage_BUILD_PYTHON:PATH=0 \
6572
-DITKPythonPackage_USE_TBB:BOOL=${use_tbb} \
6673
-G Ninja \
74+
-DCMAKE_BUILD_TYPE:STRING=${build_type} \
6775
-DCMAKE_MAKE_PROGRAM:FILEPATH=${NINJA_EXECUTABLE} \
76+
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${osx_target} \
77+
-DCMAKE_OSX_ARCHITECTURES:STRING=${osx_arch} \
6878
${SCRIPT_DIR}/../
6979
${NINJA_EXECUTABLE}
7080
popd > /dev/null 2>&1
@@ -83,18 +93,16 @@ for VENV in "${VENVS[@]}"; do
8393

8494
${Python3_EXECUTABLE} -m pip install --upgrade -r ${SCRIPT_DIR}/../requirements-dev.txt
8595

86-
build_type="Release"
8796
if [[ $(arch) == "arm64" ]]; then
8897
plat_name="macosx-11.0-arm64"
89-
osx_target="11.0"
90-
osx_arch="arm64"
9198
build_path="${SCRIPT_DIR}/../ITK-${py_mm}-macosx_arm64"
9299
else
93100
plat_name="macosx-10.9-x86_64"
94-
osx_target="10.9"
95-
osx_arch="x86_64"
96101
build_path="${SCRIPT_DIR}/../ITK-${py_mm}-macosx_x86_64"
97102
fi
103+
if [[ ! -z "${MACOSX_DEPLOYMENT_TARGET}" ]]; then
104+
osx_target="${MACOSX_DEPLOYMENT_TARGET}"
105+
fi
98106
source_path=${SCRIPT_DIR}/../ITK-source/ITK
99107
SETUP_PY_CONFIGURE="${script_dir}/setup_py_configure.py"
100108

0 commit comments

Comments
 (0)