Skip to content

Commit 8a53592

Browse files
authored
feat: drop python<=3.7 support (#769)
1 parent c3348bf commit 8a53592

File tree

64 files changed

+148
-265
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+148
-265
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ build-backend = "scikit_build_core.build"
241241
[project]
242242
name = "cmake_example"
243243
version = "0.0.1"
244-
requires-python = ">=3.7"
244+
requires-python = ">=3.8"
245245

246246
[project.optional-dependencies]
247247
test = ["pytest>=6.0"]
@@ -275,7 +275,7 @@ setup(
275275
cmake_source_dir=".",
276276
zip_safe=False,
277277
extras_require={"test": ["pytest>=6.0"]},
278-
python_requires=">=3.7",
278+
python_requires=">=3.8",
279279
)
280280
```
281281

.github/workflows/ci.yml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,17 @@ jobs:
5252
strategy:
5353
fail-fast: false
5454
matrix:
55-
python-version: ["3.7", "pypy-3.9", "3.12", "3.13"]
55+
python-version: ["3.8", "pypy-3.9", "3.13"]
5656
runs-on: [ubuntu-latest, macos-13]
5757
cmake-version: ["3.15.x"]
5858

5959
include:
60-
- python-version: "3.7"
61-
runs-on: windows-2022
62-
cmake-version: "3.21.x"
6360
- python-version: "pypy-3.8"
6461
runs-on: windows-2022
6562
cmake-version: "3.21.x"
6663
- python-version: "3.11"
6764
runs-on: windows-2022
6865
cmake-version: "3.26.x"
69-
- python-version: "pypy-3.7"
70-
runs-on: ubuntu-latest
71-
cmake-version: "3.15.x"
7266
- python-version: "pypy-3.10"
7367
runs-on: ubuntu-latest
7468
cmake-version: "3.15.x"
@@ -99,13 +93,9 @@ jobs:
9993
- python-version: "3.13"
10094
runs-on: windows-latest
10195
cmake-version: "3.26.x"
102-
- python-version: "3.7"
96+
- python-version: "3.8"
10397
runs-on: ubuntu-22.04
10498
cmake-version: "3.15.x"
105-
exclude:
106-
- python-version: "3.7"
107-
runs-on: ubuntu-latest
108-
cmake-version: "3.15.x"
10999

110100
steps:
111101
- uses: actions/checkout@v4
@@ -118,23 +108,17 @@ jobs:
118108
allow-prereleases: true
119109

120110
- uses: astral-sh/setup-uv@v5
121-
if:
122-
matrix.python-version != '3.7' && matrix.python-version != 'pypy-3.8'
123-
&& matrix.python-version != 'pypy-3.7'
111+
if: matrix.python-version != 'pypy-3.8'
124112

125113
- name: Install package (uv)
126-
if:
127-
matrix.python-version != '3.7' && matrix.python-version != 'pypy-3.8'
128-
&& matrix.python-version != 'pypy-3.7'
114+
if: matrix.python-version != 'pypy-3.8'
129115
run:
130116
uv pip install
131117
-e.[test,test-meta,test-numpy,test-schema,test-hatchling,wheels,cov,wheel-free-setuptools]
132118
--system
133119

134120
- name: Install package (pip)
135-
if:
136-
matrix.python-version == '3.7' || matrix.python-version == 'pypy-3.8'
137-
|| matrix.python-version == 'pypy-3.7'
121+
if: matrix.python-version == 'pypy-3.8'
138122
run:
139123
pip install
140124
-e.[test,test-meta,test-numpy,test-schema,wheels,cov,wheel-free-setuptools]

.pre-commit-config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,8 @@ repos:
7676
- cmake
7777
- exceptiongroup
7878
- hatch-fancy-pypi-readme>=24
79-
- importlib-metadata>=6.6.0
8079
- importlib-resources
81-
- markdown-it-py<3 # Python 3.7 compat needed for mypy check
80+
- markdown-it-py
8281
- ninja
8382
- nox
8483
- orjson

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ features over classic Scikit-build:
7070
The following limitations are present compared to classic scikit-build:
7171

7272
- The minimum supported CMake is 3.15
73-
- The minimum supported Python is 3.7
73+
- The minimum supported Python is 3.8 (3.7+ for 0.10.x and older)
7474

7575
Some known missing features that will be developed soon:
7676

@@ -218,7 +218,7 @@ sdist.cmake = false
218218
wheel.packages = ["src/<package>", "python/<package>", "<package>"]
219219

220220
# The Python tags. The default (empty string) will use the default Python
221-
# version. You can also set this to "cp37" to enable the CPython 3.7+ Stable ABI
221+
# version. You can also set this to "cp38" to enable the CPython 3.8+ Stable ABI
222222
# / Limited API (only on CPython and if the version is sufficient, otherwise
223223
# this has no effect). Or you can set it to "py3" or "py2.py3" to ignore Python
224224
# ABI compatibility. The ABI tag is inferred from this tag.

docs/cmakelists.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ in your `pyproject.toml`:
123123

124124
```toml
125125
[tool.scikit-build]
126-
wheel.py-api = "cp37"
126+
wheel.py-api = "cp38"
127127
```
128128

129129
When you do that, `${SKBUILD_SABI_COMPONENT}` will be set to

docs/conf.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,13 @@
77
from __future__ import annotations
88

99
import importlib
10+
import importlib.metadata
1011
import inspect
1112
import os
1213
import sys
1314
import warnings
1415
from pathlib import Path
1516

16-
if sys.version_info < (3, 8):
17-
import importlib_metadata
18-
else:
19-
import importlib.metadata as importlib_metadata
20-
2117
try:
2218
import scikit_build_core
2319
except ModuleNotFoundError:
@@ -32,7 +28,7 @@
3228
from scikit_build_core import __version__ as version
3329
except ModuleNotFoundError:
3430
try:
35-
version = importlib_metadata.version("scikit_build_core")
31+
version = importlib.metadata.version("scikit_build_core")
3632
except ModuleNotFoundError:
3733
msg = (
3834
"Package should be installed to produce documentation! "

docs/configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ the wheel tags for the version you support:
352352

353353
```toml
354354
[tool.scikit-build]
355-
wheel.py-api = "cp37"
355+
wheel.py-api = "cp38"
356356
```
357357

358358
Scikit-build-core will only target ABI3 if the version of Python is equal to or
@@ -698,8 +698,8 @@ configuration. Recommendations:
698698
Known limitations:
699699

700700
- Resources (via `importlib.resources`) are not properly supported (yet).
701-
Currently experimentally supported except on Python 3.9 (3.7, 3.8, 3.10, 3.11,
702-
and 3.12 work). `importlib_resources` may work on Python 3.9.
701+
Currently experimentally supported except on Python 3.9 (3.8, 3.10, 3.11,
702+
3.12, and 3.13 work). `importlib_resources` may work on Python 3.9.
703703

704704
```console
705705
# Very experimental rebuild on initial import feature

docs/examples/downstream/pybind11_example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
| pip builds | [![Pip Actions Status][actions-pip-badge]][actions-pip-link] |
99

1010
An example project built with [pybind11](https://github.com/pybind/pybind11) and
11-
scikit-build-core. Python 3.7+ (see older commits for older versions of Python).
11+
scikit-build-core. Python 3.8+ (see older commits for older versions of Python).
1212

1313
[gitter-badge]: https://badges.gitter.im/pybind/Lobby.svg
1414
[gitter-link]: https://gitter.im/pybind/Lobby

docs/examples/downstream/pybind11_example/pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ readme = "README.md"
1111
authors = [
1212
{ name = "My Name", email = "me@email.com" },
1313
]
14-
requires-python = ">=3.7"
14+
requires-python = ">=3.8"
1515
classifiers = [
1616
"Development Status :: 4 - Beta",
1717
"License :: OSI Approved :: MIT License",
1818
"Programming Language :: Python :: 3 :: Only",
19-
"Programming Language :: Python :: 3.7",
2019
"Programming Language :: Python :: 3.8",
2120
"Programming Language :: Python :: 3.9",
2221
"Programming Language :: Python :: 3.10",
2322
"Programming Language :: Python :: 3.11",
23+
"Programming Language :: Python :: 3.12",
24+
"Programming Language :: Python :: 3.13",
2425
]
2526

2627
[project.optional-dependencies]

docs/examples/getting_started/abi3/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ find_package(
66
COMPONENTS Interpreter Development.SABIModule
77
REQUIRED)
88

9-
python_add_library(example MODULE example.c WITH_SOABI USE_SABI 3.7)
9+
python_add_library(example MODULE example.c WITH_SOABI USE_SABI 3.8)
1010

1111
install(TARGETS example DESTINATION .)

0 commit comments

Comments
 (0)