Skip to content

Commit 9f2a2eb

Browse files
committed
Add CMake 4.1 support, drop Python 2.x, and update packaging
- Extended CMake compatibility to 4.1. - Dropped Python 2.x support; minimum required Python is now 3.7. - Added Python 3.13 to test matrix and classifiers. - Removed obsolete setuptools and setup.py references. - Updated build backend to use hatchling exclusively. - Updated release notes and migration notes accordingly.
1 parent 4f45b8d commit 9f2a2eb

File tree

10 files changed

+31
-106
lines changed

10 files changed

+31
-106
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
sphinx: [ "5", "6", "7", "8" ]
20-
cmake: [ "3.20", "3.30" ]
20+
cmake: [ "3.20", "4.1" ]
2121
os: [ "ubuntu", "macos", "windows" ]
22-
python: [ "3.8", "3.11", "3.12" ]
22+
python: [ "3.8", "3.12", "3.13" ]
2323
exclude:
2424
- sphinx: "8"
2525
python: "3.8"
26+
- sphinx: "5"
27+
python: "3.13"
2628

2729
name: |
2830
v${{ matrix.sphinx }}-${{ matrix.cmake }}

.versup.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@
66
"version = \"[version]\""
77
]
88
],
9-
"setup.py": [
10-
[
11-
"version=\"([\\d\\.]+)\"",
12-
"version=\"[version]\""
13-
]
14-
],
159
"doc/release/release_notes.rst": [
1610
[
1711
".. release:: Upcoming",

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Sphinx CMake
22

33
[![PyPi version](https://img.shields.io/pypi/v/sphinx-cmake.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.python.org/pypi/sphinx-cmake)
4-
[![CMake](https://img.shields.io/badge/CMake-3.20...3.30-blue.svg?logo=CMake&logoColor=blue)](https://cmake.org)
4+
[![CMake](https://img.shields.io/badge/CMake-3.20...4.1-blue.svg?logo=CMake&logoColor=blue)](https://cmake.org)
55
[![Test](https://github.com/python-cmake/sphinx-cmake/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/python-cmake/sphinx-cmake/actions/workflows/test.yml)
66
[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
77

build_backend.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

build_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def initialize(self, version, build_data):
3333
stream.write(
3434
"include(CMakePackageConfigHelpers)\n"
3535
"write_basic_package_version_file(\n"
36-
f" \"{str(version_config_path)}\"\n"
36+
f" \"{str(version_config_path.as_posix())}\"\n"
3737
f" VERSION {sphinx.__version__}\n"
3838
" COMPATIBILITY AnyNewerVersion\n"
3939
")"

cmake/FindSphinx.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# prepend a custom search path.
1717
# (https://cmake.org/cmake/help/latest/policy/CMP0074.html)
1818

19-
cmake_minimum_required(VERSION 3.20...3.30)
19+
cmake_minimum_required(VERSION 3.20...4.1)
2020

2121
include(FindPackageHandleStandardArgs)
2222

doc/release/migration_notes.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,10 @@ Migration notes
66

77
This section will show more detailed information when relevant for switching to
88
a new version, such as when upgrading involves backwards incompatibilities.
9+
10+
.. _release/migration/1.0.0:
11+
12+
Migrate to 1.0.0
13+
================
14+
15+
Dropped support for Python 2.x. The minimum supported version is now Python 3.7.

doc/release/release_notes.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44
Release Notes
55
*************
66

7+
.. release:: Upcoming
8+
9+
.. change:: new
10+
11+
Added compatibility with CMake 4.1.
12+
13+
.. change:: changed
14+
15+
Dropped support for Python 2.x. The minimum supported version is now
16+
Python 3.7.
17+
718
.. release:: 0.2.2
819
:date: 2024-10-06
920

pyproject.toml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
[build-system]
22
requires = [
3-
"hatchling >= 1.4; python_version >= '3'",
4-
"setuptools >= 44; python_version < '3'",
5-
"cmake >= 3.20, < 3.31"
3+
"hatchling >= 1.4",
4+
"cmake >= 3.20, < 4.2"
65
]
7-
build-backend = "build_backend"
8-
backend-path = ["."]
6+
build-backend = "hatchling.build"
97

108
[project]
119
name = "sphinx-cmake"
1210
version = "0.2.2"
1311
description = "Provide CMake module for Sphinx"
1412
readme = "README.md"
15-
requires-python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4"
13+
requires-python = ">=3.7, <4"
1614
license = {file = "LICENSE"}
1715
keywords = ["cmake", "sphinx", "development"]
1816
authors = [
@@ -25,15 +23,14 @@ classifiers = [
2523
"Intended Audience :: Developers",
2624
"Topic :: Software Development :: Build Tools",
2725
"License :: OSI Approved :: MIT License",
28-
"Programming Language :: Python :: 2",
29-
"Programming Language :: Python :: 2.7",
3026
"Programming Language :: Python :: 3",
3127
"Programming Language :: Python :: 3.7",
3228
"Programming Language :: Python :: 3.8",
3329
"Programming Language :: Python :: 3.9",
3430
"Programming Language :: Python :: 3.10",
3531
"Programming Language :: Python :: 3.11",
3632
"Programming Language :: Python :: 3.12",
33+
"Programming Language :: Python :: 3.13",
3734
]
3835

3936
[project.urls]
@@ -55,4 +52,4 @@ path = "build_config.py"
5552
only-include = ["*.cmake"]
5653

5754
[tool.hatch.build.targets.sdist]
58-
only-include = ["cmake", "build_config.py", "build_backend.py", "setup.py"]
55+
only-include = ["cmake", "build_config.py"]

setup.py

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)