diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a43c14c..31286d3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,7 +46,7 @@ jobs: needs: package strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-13] python-version: ['3.8', '3.11'] runs-on: ${{ matrix.os }} steps: @@ -63,4 +63,4 @@ jobs: python -m pip install --upgrade pip - name: Build and Install SimpleITK Package run: | - python -m pip install ${{steps.download.outputs.download-path}}/SimpleITK-*.tar.gz + python -m pip install ${{steps.download.outputs.download-path}}/simpleitk-*.tar.gz diff --git a/CMakeLists.txt b/CMakeLists.txt index 0cc9d47..ca2f6c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.26) project(SimpleITKPythonPackage NONE) @@ -163,10 +163,13 @@ if(SimpleITKPythonPackage_SUPERBUILD) message(STATUS "SuperBuild - Searching for python") - if (PYTHON_VERSION_STRING) - # need to do something with the passed variable to silence unused - # CMake warning. + if ( PYTHON_VERSION_STRING VERSION_GREATER_EQUAL "3.11.0") + + set(_SimpleITK_PYTHON_USE_LIMITED_API_DEFAULT ON) + else () + set(_SimpleITK_PYTHON_USE_LIMITED_API_DEFAULT OFF) endif() + option( SimpleITK_PYTHON_USE_LIMITED_API "Use Python limited API, for minor version compatibility." ${_SimpleITK_PYTHON_USE_LIMITED_API_DEFAULT} ) # Sanity checks if(DEFINED PYTHON_INCLUDE_DIR AND NOT EXISTS ${PYTHON_INCLUDE_DIR}) @@ -213,6 +216,7 @@ if(SimpleITKPythonPackage_SUPERBUILD) -DPython_EXECUTABLE:PATH=${PYTHON_EXECUTABLE} -DBUILD_TESTING:BOOL=OFF -DSimpleITK_PYTHON_THREADS:BOOL=${SimpleITK_PYTHON_THREADS} + -DSimpleITK_PYTHON_USE_LIMITED_API:BOOL=${SimpleITK_PYTHON_USE_LIMITED_API} -DSimpleITK_DIR:PATH=${SimpleITK_DIR} -DITK_DIR:PATH=${ITK_DIR} -DSWIG_EXECUTABLE:PATH=${SWIG_EXECUTABLE} diff --git a/README.md b/README.md index 0318eee..1a7f19d 100644 --- a/README.md +++ b/README.md @@ -98,16 +98,14 @@ Building wheels requires: Build the SimpleITK Python wheel with the following command: ``` -mkvirtualenv build-sitk -pip install -r requirements-dev.txt -python setup.py bdist_wheel +python -m build . ``` ### Building Source Distribution The Python [build](https://pypa-build.readthedocs.io/en/latest/) package should be used to build the source distribution: ``` -python -m build --sdist +python -m build --sdist . ``` ### Efficiently building wheels for different version of python diff --git a/SimpleITK b/SimpleITK index 42ce27d..cf120d6 160000 --- a/SimpleITK +++ b/SimpleITK @@ -1 +1 @@ -Subproject commit 42ce27df414cfc174e7b4fb379a643360d10348a +Subproject commit cf120d6471195771881794519ea2077867499fe7 diff --git a/pyproject.toml b/pyproject.toml index 634ef6b..47da5e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ requires = [ "scikit-build>=0.17.6", "wheel", - "cmake>=3.16.4", + "cmake>=3.26.0", "ninja; platform_system!='Windows'" ] build-backend = "setuptools.build_meta" diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 91958a4..0000000 --- a/requirements-dev.txt +++ /dev/null @@ -1 +0,0 @@ -scikit-build>=0.14.1 diff --git a/setup.py b/setup.py index 2617108..7b91177 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name='SimpleITK', - version='2.3.1', + version='2.4.1', author='Insight Software Consortium', author_email='insight-users@itk.org', packages=['SimpleITK'],