Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: scikit-build/cmake-python-distributions
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.31.6
Choose a base ref
...
head repository: scikit-build/cmake-python-distributions
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4.0.0
Choose a head ref
  • 5 commits
  • 11 files changed
  • 4 contributors

Commits on Mar 10, 2025

  1. chore(deps): update pre-commit hooks (#593)

    updates:
    - [github.com/astral-sh/ruff-pre-commit: v0.9.7 → v0.9.9](astral-sh/ruff-pre-commit@v0.9.7...v0.9.9)
    
    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    pre-commit-ci[bot] authored Mar 10, 2025
    Copy the full SHA
    bf1edca View commit details

Commits on Mar 20, 2025

  1. chore(deps): update pre-commit hooks (#595)

    updates:
    - [github.com/astral-sh/ruff-pre-commit: v0.9.9 → v0.11.0](astral-sh/ruff-pre-commit@v0.9.9...v0.11.0)
    
    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    pre-commit-ci[bot] authored Mar 20, 2025
    Copy the full SHA
    22aec91 View commit details

Commits on Mar 22, 2025

  1. chore(deps): bump the actions group across 1 directory with 3 updates (

    …#594)
    
    * chore(deps): bump the actions group across 1 directory with 3 updates
    
    Bumps the actions group with 3 updates in the / directory: [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action), [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) and [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance).
    
    
    Updates `docker/setup-qemu-action` from 3.4.0 to 3.6.0
    - [Release notes](https://github.com/docker/setup-qemu-action/releases)
    - [Commits](docker/setup-qemu-action@v3.4.0...v3.6.0)
    
    Updates `pypa/cibuildwheel` from 2.22 to 2.23
    - [Release notes](https://github.com/pypa/cibuildwheel/releases)
    - [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
    - [Commits](pypa/cibuildwheel@v2.22...v2.23)
    
    Updates `actions/attest-build-provenance` from 2.2.0 to 2.2.3
    - [Release notes](https://github.com/actions/attest-build-provenance/releases)
    - [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md)
    - [Commits](actions/attest-build-provenance@520d128...c074443)
    
    ---
    updated-dependencies:
    - dependency-name: docker/setup-qemu-action
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: actions
    - dependency-name: pypa/cibuildwheel
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: actions
    - dependency-name: actions/attest-build-provenance
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: actions
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    * fix: find OpenSSL when pkg-config & libssl-dev are present
    
    * fix: tests on musllinux_1_2
    
    ---------
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mayeut <mayeut@users.noreply.github.com>
    dependabot[bot] and mayeut authored Mar 22, 2025
    Copy the full SHA
    fa2d774 View commit details
  2. chore(ci): use astral-sh/setup-uv & uv pip install --group (#596)

    * chore(ci): use `astral-sh/setup-uv` & `uv pip install --group`
    
    * fix more warnings
    mayeut authored Mar 22, 2025
    Copy the full SHA
    8aa0f61 View commit details

Commits on Mar 27, 2025

  1. [Bot] Update to CMake 4.0.0 (#598)

    Co-authored-by: scikit-build-app-bot[bot] <173546081+scikit-build-app-bot[bot]@users.noreply.github.com>
    scikit-build-app-bot[bot] authored Mar 27, 2025
    Copy the full SHA
    658a0da View commit details
Showing with 68 additions and 54 deletions.
  1. +11 −6 .github/workflows/build.yml
  2. +1 −1 .pre-commit-config.yaml
  3. +7 −0 CMakeLists.txt
  4. +14 −14 CMakeUrls.cmake
  5. +1 −1 README.rst
  6. +1 −1 docs/index.rst
  7. +2 −2 docs/make_a_release.rst
  8. +6 −6 docs/update_cmake_version.rst
  9. +22 −20 pyproject.toml
  10. +1 −1 scripts/manylinux-build-and-install-openssl.sh
  11. +2 −2 tests/test_cmake.py
17 changes: 11 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -115,14 +115,17 @@ jobs:
with:
fetch-depth: 0 # required for versioneer to find tags

- uses: yezz123/setup-uv@v4
- uses: astral-sh/setup-uv@v5
if: (!matrix.use_qemu) || fromJSON(env.USE_QEMU)
with:
enable-cache: false

- name: Set up QEMU
uses: docker/setup-qemu-action@v3.4.0
uses: docker/setup-qemu-action@v3.6.0
if: matrix.use_qemu && fromJSON(env.USE_QEMU)

- name: Build wheels
uses: pypa/cibuildwheel@v2.22
uses: pypa/cibuildwheel@v2.23
if: (!matrix.use_qemu) || fromJSON(env.USE_QEMU)
env:
CIBW_ARCHS: "${{ matrix.arch }}"
@@ -151,7 +154,7 @@ jobs:
fetch-depth: 0 # required for versioneer to find tags

- name: Build wheels
uses: pypa/cibuildwheel@v2.22
uses: pypa/cibuildwheel@v2.23
env:
CIBW_ARCHS: "${{ matrix.arch }}"
CIBW_BUILD: "cp39-manylinux_*"
@@ -193,11 +196,13 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: false

- name: Setup environment
run: |
uv venv --python ${{ matrix.python }}
uv pip install pytest pytest-cov
uv pip install --group test
- name: Install dependencies
run: |
@@ -307,7 +312,7 @@ jobs:
path: dist

- name: Generate artifact attestation for sdist and wheel
uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2.2.0
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
with:
subject-path: "dist/cmake-*"

2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.9.7"
rev: "v0.11.0"
hooks:
- id: ruff
args: [--fix, --show-fixes]
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -241,6 +241,13 @@ if(CMakePythonDistributions_SUPERBUILD)
message(STATUS "SuperBuild - CMakeProject-build - OPENSSL_ROOT_DIR: ${OPENSSL_ROOT_DIR}")
endif()

if(DEFINED OPENSSL_USE_STATIC_LIBS)
list(APPEND _cmake_cache_args
-DOPENSSL_USE_STATIC_LIBS:BOOL=${OPENSSL_USE_STATIC_LIBS}
)
message(STATUS "SuperBuild - CMakeProject-build - OPENSSL_USE_STATIC_LIBS: ${OPENSSL_USE_STATIC_LIBS}")
endif()

if(DEFINED CMAKE_CXX_STANDARD)
list(APPEND _cmake_cache_args
-DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD}
28 changes: 14 additions & 14 deletions CMakeUrls.cmake
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@

#-----------------------------------------------------------------------------
# CMake sources
set(unix_source_url "https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6.tar.gz")
set(unix_source_sha256 "653427f0f5014750aafff22727fb2aa60c6c732ca91808cfb78ce22ddd9e55f0")
set(unix_source_url "https://github.com/Kitware/CMake/releases/download/v4.0.0/cmake-4.0.0.tar.gz")
set(unix_source_sha256 "ddc54ad63b87e153cf50be450a6580f1b17b4881de8941da963ff56991a4083b")

set(windows_source_url "https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6.zip")
set(windows_source_sha256 "106df3d82f20aaa52a5f575c836effc5713a2fe3235f38e9be5c8a14b8d35530")
set(windows_source_url "https://github.com/Kitware/CMake/releases/download/v4.0.0/cmake-4.0.0.zip")
set(windows_source_sha256 "7691fb5621e4852d1561cc81d5a09cea6fdff646d4d12d2e893b2c0d4ea4dd10")

#-----------------------------------------------------------------------------
# CMake binaries

set(linux32_binary_url "NA") # Linux 32-bit binaries not available
set(linux32_binary_sha256 "NA")

set(linux64_binary_url "https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6-linux-x86_64.tar.gz")
set(linux64_binary_sha256 "5a1133ff103c71eb5120e2cc3de922733e7d8a26a98ae716397e8676adb367bf")
set(linux64_binary_url "https://github.com/Kitware/CMake/releases/download/v4.0.0/cmake-4.0.0-linux-x86_64.tar.gz")
set(linux64_binary_sha256 "a06e6e32da747e569162bc0442a3fd400fadd9db7d4f185c9e4464ab299a294b")

set(macos10_10_binary_url "https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6-macos10.10-universal.tar.gz")
set(macos10_10_binary_sha256 "dc49fe67e0841e1d21b9e694d4858bbc06118165be5ebd8da0f2028216d56e6c")
set(macos10_10_binary_url "https://github.com/Kitware/CMake/releases/download/v4.0.0/cmake-4.0.0-macos10.10-universal.tar.gz")
set(macos10_10_binary_sha256 "94c92c76ac861da7e450d44805be828a8c9b2c3c5dd75144c91248fe1d177eea")

set(win32_binary_url "https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6-windows-i386.zip")
set(win32_binary_sha256 "005ef676975aa0f8348fc2c8011a913f9676f07f602ca624ee0811b427d3fd84")
set(win32_binary_url "https://github.com/Kitware/CMake/releases/download/v4.0.0/cmake-4.0.0-windows-i386.zip")
set(win32_binary_sha256 "28408c0ca3b4461550bbcad94c526846699ed79366d81b57db0375cb119875dd")

set(win64_binary_url "https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6-windows-x86_64.zip")
set(win64_binary_sha256 "d163cd3ab4959b0a53fa8988f2ddbd2e6c501658201e6a154386bad9dbe4f836")
set(win64_binary_url "https://github.com/Kitware/CMake/releases/download/v4.0.0/cmake-4.0.0-windows-x86_64.zip")
set(win64_binary_sha256 "89e87f3e297b70f1349ee7c5f90783ca96efb986b70c558c799c3c9b1b716456")

set(winarm64_binary_url "https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6-windows-arm64.zip")
set(winarm64_binary_sha256 "fa648fd417f44e6cb08928964a480ade0d18df421f9b623639dba22f9b301e4e")
set(winarm64_binary_url "https://github.com/Kitware/CMake/releases/download/v4.0.0/cmake-4.0.0-windows-arm64.zip")
set(winarm64_binary_sha256 "6a24f1ea0965a10a2508b16db1ec8b62c83d5323ac33a1aa7d201797ba147302")
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ The suite of CMake tools were created by Kitware in response to the need
for a powerful, cross-platform build environment for open-source projects
such as ITK and VTK.

The CMake python wheels provide `CMake 3.31.6 <https://cmake.org/cmake/help/v3.31/index.html>`_.
The CMake python wheels provide `CMake 4.0.0 <https://cmake.org/cmake/help/v4.0/index.html>`_.

Latest Release
--------------
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ The suite of CMake tools were created by Kitware in response to the need
for a powerful, cross-platform build environment for open-source projects
such as `ITK <https://itk.org>`_ and `VTK <https://vtk.org>`_.

The CMake python wheels provide `CMake 3.31.6 <https://cmake.org/cmake/help/v3.31/index.html>`_.
The CMake python wheels provide `CMake 4.0.0 <https://cmake.org/cmake/help/v4.0/index.html>`_.

.. toctree::
:maxdepth: 2
4 changes: 2 additions & 2 deletions docs/make_a_release.rst
Original file line number Diff line number Diff line change
@@ -44,8 +44,8 @@ Prerequisites

.. code:: console
$ git tag --sign -m 'cmake-python-distributions 3.31.6' 3.31.6 main
$ git push origin 3.31.6
$ git tag --sign -m 'cmake-python-distributions 4.0.0' 4.0.0 main
$ git push origin 4.0.0
.. warning::

12 changes: 6 additions & 6 deletions docs/update_cmake_version.rst
Original file line number Diff line number Diff line change
@@ -29,13 +29,13 @@ Classic procedure:
2. Execute `scripts/update_cmake_version.py` command line tool with the desired
``X.Y.Z`` CMake version available for download. For example::

$ release=3.31.6
$ release=4.0.0
$ ./scripts/update_cmake_version.py $release
Collecting URLs and SHA256s from 'https://api.github.com/repos/Kitware/CMake/releases/tags/v3.31.6'
Collecting URLs and SHA256s from 'https://api.github.com/repos/Kitware/CMake/releases/tags/v4.0.0'
[...]
Collecting URLs and SHA256s from 'https://api.github.com/repos/Kitware/CMake/releases/tags/v3.31.6' - done
Updating 'CMakeUrls.cmake' with CMake version 3.31.6
Updating 'CMakeUrls.cmake' with CMake version 3.31.6 - done
Collecting URLs and SHA256s from 'https://api.github.com/repos/Kitware/CMake/releases/tags/v4.0.0' - done
Updating 'CMakeUrls.cmake' with CMake version 4.0.0
Updating 'CMakeUrls.cmake' with CMake version 4.0.0 - done
Updating docs/index.rst
Updating docs/index.rst - done
Updating README.rst
@@ -46,7 +46,7 @@ Classic procedure:
3. Create a topic named `update-to-cmake-X.Y.Z` and commit the changes.
For example::

release=3.31.6
release=4.0.0
git switch -c update-to-cmake-$release
git add -u CMakeUrls.cmake docs/index.rst README.rst tests/test_cmake.py docs/update_cmake_version.rst
git commit -m "Update to CMake $release"
42 changes: 22 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ backend-path = ["_build_backend"]

[project]
name = "cmake"
version = "3.31.6"
version = "4.0.0"
description = "CMake is an open-source, cross-platform family of tools designed to build, test and package software"
keywords = ["CMake", "build", "c++", "fortran", "cross-platform", "cross-compilation"]
readme = "README.rst"
@@ -99,6 +99,7 @@ test-groups = ["test"]
test-command = "pytest {project}/tests"
build-verbosity = 1
build-frontend = "build[uv]"
config-settings."cmake.define.RUN_CMAKE_TEST" = "ON"
environment = { CMAKE_PYTHON_DIST_FORCE_NINJA_DEP = "1" }
musllinux-x86_64-image = "musllinux_1_1"
musllinux-i686-image = "musllinux_1_1"
@@ -112,37 +113,38 @@ select = "*-macos*"
inherit.environment = "append"
environment = { MACOSX_DEPLOYMENT_TARGET = "10.10" }

[tool.cibuildwheel.linux]
before-all = "./scripts/manylinux-build-and-install-openssl.sh"

[tool.cibuildwheel.config-settings]
"cmake.define.RUN_CMAKE_TEST" = "ON"

[tool.cibuildwheel.linux.config-settings]
"cmake.define.OPENSSL_ROOT_DIR" = "/usr/local/ssl"
"cmake.define.CMAKE_JOB_POOL_COMPILE" = "compile"
"cmake.define.CMAKE_JOB_POOL_LINK" = "link"
"cmake.define.CMAKE_JOB_POOLS" = "compile=4;link=1"
"cmake.define.RUN_CMAKE_TEST" = "ON"

[[tool.cibuildwheel.overrides]]
select = ["*-musllinux_*",]
select = "*-*linux*"
before-all = "./scripts/manylinux-build-and-install-openssl.sh"
inherit.environment = "prepend"
environment = { PKG_CONFIG_PATH = "/usr/local/ssl/lib/pkgconfig" }
inherit.config-settings = "prepend"
config-settings."cmake.define.OPENSSL_ROOT_DIR" = "/usr/local/ssl"
config-settings."cmake.define.OPENSSL_USE_STATIC_LIBS" = "ON"
config-settings."cmake.define.CMAKE_JOB_POOL_COMPILE" = "compile"
config-settings."cmake.define.CMAKE_JOB_POOL_LINK" = "link"
config-settings."cmake.define.CMAKE_JOB_POOLS" = "compile=4;link=1"
config-settings."cmake.define.RUN_CMAKE_TEST" = "ON"

[[tool.cibuildwheel.overrides]]
select = ["*-musllinux_*"]
inherit.config-settings = "append"
# disable some tests
# - BootstrapTest fails with custom OpenSSL and probably does not make much sense for this project
# - ExportImport|RunCMake.install|RunCMake.file-GET_RUNTIME_DEPENDENCIES: c.f. https://discourse.cmake.org/t/cmake-test-suite-failing-on-alpine-linux/5064
config-settings."cmake.define.RUN_CMAKE_TEST_EXCLUDE" = "BootstrapTest|ExportImport|RunCMake.install|RunCMake.RuntimePath|RunCMake.file-GET_RUNTIME_DEPENDENCIES"

[[tool.cibuildwheel.overrides]]
select = ["*-musllinux_armv7l"]
inherit.config-settings = "append"
# disable some tests
# - BootstrapTest fails with custom OpenSSL and probably does not make much sense for this project
# - ExportImport|RunCMake.install|RunCMake.file-GET_RUNTIME_DEPENDENCIES: c.f. https://discourse.cmake.org/t/cmake-test-suite-failing-on-alpine-linux/5064
# - CTestTestFdSetSize fails on gcc14+ with "error: implicit declaration of function 'usleep'""
config-settings."cmake.define.RUN_CMAKE_TEST_EXCLUDE" = "BootstrapTest|CTestTestFdSetSize|ExportImport|RunCMake.install|RunCMake.RuntimePath|RunCMake.file-GET_RUNTIME_DEPENDENCIES"

[[tool.cibuildwheel.overrides]]
select = ["*linux_ppc64le", "*linux_s390x"]
config-settings."cmake.define.OPENSSL_ROOT_DIR" = "/usr/local/ssl"
config-settings."cmake.define.CMAKE_JOB_POOL_COMPILE" = "compile"
config-settings."cmake.define.CMAKE_JOB_POOL_LINK" = "link"
config-settings."cmake.define.CMAKE_JOB_POOLS" = "compile=4;link=1"
inherit.config-settings = "append"
# disable tests on those platforms, QEMU is taking to long for jobs to pass on GHA
config-settings."cmake.define.RUN_CMAKE_TEST" = "OFF"

2 changes: 1 addition & 1 deletion scripts/manylinux-build-and-install-openssl.sh
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ rm -rf ${OPENSSL_ROOT}.tar.gz

# Configure
pushd ${OPENSSL_ROOT}
./config no-shared -fPIC --prefix=/usr/local/ssl --openssldir=/usr/local/ssl > /dev/null
./config no-shared no-tests -fPIC --prefix=/usr/local/ssl --openssldir=/usr/local/ssl > /dev/null

# Build
make -j$(nproc) > /dev/null
4 changes: 2 additions & 2 deletions tests/test_cmake.py
Original file line number Diff line number Diff line change
@@ -68,14 +68,14 @@ def _get_scripts():

@all_tools
def test_cmake_script(tool):
expected_version = "3.31.6"
expected_version = "4.0.0"
scripts = [script for script in _get_scripts() if script.stem == tool]
assert len(scripts) == 1
output = subprocess.check_output([str(scripts[0]), "--version"]).decode("ascii")
assert output.splitlines()[0] == f"{tool} version {expected_version}"


def test_cmake_main():
expected_version = "3.31.6"
expected_version = "4.0.0"
output = subprocess.run([sys.executable, "-m", "cmake", "--version"], text=True, capture_output=True, check=False).stdout
assert output.splitlines()[0] == f"cmake version {expected_version}"