Skip to content

Commit 2cde533

Browse files
committed
Update to SimpleITK 2.4.1
Add SimpleITK_PYTHON_USE_LIMITED_API option and update cmake version to 3.26
1 parent f31a7ec commit 2cde533

6 files changed

+13
-12
lines changed

CMakeLists.txt

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
cmake_minimum_required(VERSION 3.3)
2+
cmake_minimum_required(VERSION 3.26)
33

44
project(SimpleITKPythonPackage NONE)
55

@@ -163,10 +163,13 @@ if(SimpleITKPythonPackage_SUPERBUILD)
163163

164164
message(STATUS "SuperBuild - Searching for python")
165165

166-
if (PYTHON_VERSION_STRING)
167-
# need to do something with the passed variable to silence unused
168-
# CMake warning.
166+
if ( PYTHON_VERSION_STRING VERSION_GREATER_EQUAL "3.11.0")
167+
168+
set(_SimpleITK_PYTHON_USE_LIMITED_API_DEFAULT ON)
169+
else ()
170+
set(_SimpleITK_PYTHON_USE_LIMITED_API_DEFAULT OFF)
169171
endif()
172+
option( SimpleITK_PYTHON_USE_LIMITED_API "Use Python limited API, for minor version compatibility." ${_SimpleITK_PYTHON_USE_LIMITED_API_DEFAULT} )
170173

171174
# Sanity checks
172175
if(DEFINED PYTHON_INCLUDE_DIR AND NOT EXISTS ${PYTHON_INCLUDE_DIR})
@@ -213,6 +216,7 @@ if(SimpleITKPythonPackage_SUPERBUILD)
213216
-DPython_EXECUTABLE:PATH=${PYTHON_EXECUTABLE}
214217
-DBUILD_TESTING:BOOL=OFF
215218
-DSimpleITK_PYTHON_THREADS:BOOL=${SimpleITK_PYTHON_THREADS}
219+
-DSimpleITK_PYTHON_USE_LIMITED_API:BOOL=${SimpleITK_PYTHON_USE_LIMITED_API}
216220
-DSimpleITK_DIR:PATH=${SimpleITK_DIR}
217221
-DITK_DIR:PATH=${ITK_DIR}
218222
-DSWIG_EXECUTABLE:PATH=${SWIG_EXECUTABLE}

README.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,14 @@ Building wheels requires:
9898
Build the SimpleITK Python wheel with the following command:
9999

100100
```
101-
mkvirtualenv build-sitk
102-
pip install -r requirements-dev.txt
103-
python setup.py bdist_wheel
101+
python -m build .
104102
```
105103
### Building Source Distribution
106104

107105
The Python [build](https://pypa-build.readthedocs.io/en/latest/) package should be used to build the source distribution:
108106

109107
```
110-
python -m build --sdist
108+
python -m build --sdist .
111109
```
112110

113111
### Efficiently building wheels for different version of python

SimpleITK

Submodule SimpleITK updated 534 files

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
requires = [
33
"scikit-build>=0.17.6",
44
"wheel",
5-
"cmake>=3.16.4",
5+
"cmake>=3.26.0",
66
"ninja; platform_system!='Windows'"
77
]
88
build-backend = "setuptools.build_meta"

requirements-dev.txt

-1
This file was deleted.

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setup(
1010
name='SimpleITK',
11-
version='2.3.1',
11+
version='2.4.1',
1212
author='Insight Software Consortium',
1313
author_email='[email protected]',
1414
packages=['SimpleITK'],

0 commit comments

Comments
 (0)