From 4fba8e7a87483b0d3899b46f327c0eec0801388e Mon Sep 17 00:00:00 2001 From: Jeremy Retailleau Date: Mon, 8 Dec 2025 12:23:56 -0800 Subject: [PATCH] Add support for CMake 4.2 and Pytest 9. --- .github/workflows/test.yml | 6 +++--- README.md | 2 +- cmake/FindPytest.cmake | 2 +- cmake/PytestAddTests.cmake | 2 +- doc/release/release_notes.rst | 6 ++++++ pyproject.toml | 4 ++-- 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b6b346b..306f21f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,10 +16,10 @@ jobs: strategy: fail-fast: false matrix: - pytest: [ "7", "8" ] - cmake: [ "3.20", "4.1" ] + pytest: [ "8", "9" ] + cmake: [ "3.20", "4.2" ] os: [ "ubuntu", "macos", "windows" ] - python: [ "3.8", "3.12", "3.13" ] + python: [ "3.10", "3.14" ] bundled: [ false, true ] name: | diff --git a/README.md b/README.md index 7e046b5..7d52a6f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Pytest CMake [![PyPi version](https://img.shields.io/pypi/v/pytest-cmake.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.python.org/pypi/pytest-cmake) -[![CMake](https://img.shields.io/badge/CMake-3.20...4.1-blue.svg?logo=CMake&logoColor=blue)](https://cmake.org) +[![CMake](https://img.shields.io/badge/CMake-3.20...4.2-blue.svg?logo=CMake&logoColor=blue)](https://cmake.org) [![Test](https://github.com/python-cmake/pytest-cmake/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/python-cmake/pytest-cmake/actions/workflows/test.yml) [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) diff --git a/cmake/FindPytest.cmake b/cmake/FindPytest.cmake index 963bf97..29ecb26 100644 --- a/cmake/FindPytest.cmake +++ b/cmake/FindPytest.cmake @@ -17,7 +17,7 @@ # prepend a custom search path. # (https://cmake.org/cmake/help/latest/policy/CMP0074.html) -cmake_minimum_required(VERSION 3.20...4.1) +cmake_minimum_required(VERSION 3.20...4.2) include(FindPackageHandleStandardArgs) diff --git a/cmake/PytestAddTests.cmake b/cmake/PytestAddTests.cmake index aa1eabe..a11dd60 100644 --- a/cmake/PytestAddTests.cmake +++ b/cmake/PytestAddTests.cmake @@ -1,5 +1,5 @@ # Wrapper used to create individual CTest tests from Pytest tests. -cmake_minimum_required(VERSION 3.20...4.1) +cmake_minimum_required(VERSION 3.20...4.2) if(CMAKE_SCRIPT_MODE_FILE) diff --git a/doc/release/release_notes.rst b/doc/release/release_notes.rst index 0e98acf..17c364d 100644 --- a/doc/release/release_notes.rst +++ b/doc/release/release_notes.rst @@ -4,6 +4,12 @@ Release Notes ************* +.. release:: Upcoming + + .. change:: new + + Added compatibility with CMake 4.2 and Pytest v9. + .. release:: 1.1.0 :date: 2025-08-14 diff --git a/pyproject.toml b/pyproject.toml index 119af67..0628a2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [build-system] requires = [ "hatchling >= 1.4", - "cmake >= 3.20, < 4.2" + "cmake >= 3.20, < 4.3" ] build-backend = "hatchling.build" @@ -17,7 +17,7 @@ authors = [ {name = "Jeremy Retailleau", email = "jeremy.retailleau@gmail.com" } ] dependencies = [ - "pytest >= 4, < 9", + "pytest >= 4, < 10", ] classifiers = [ "Intended Audience :: Developers",