Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ build-backend = "scikit_build_core.build"
[project]
name = "cmake_example"
version = "0.0.1"
requires-python = ">=3.8"
requires-python = ">=3.9"

[project.optional-dependencies]
test = ["pytest>=6.0"]
Expand Down Expand Up @@ -275,7 +275,7 @@ setup(
cmake_source_dir=".",
zip_safe=False,
extras_require={"test": ["pytest>=6.0"]},
python_requires=">=3.8",
python_requires=">=3.9",
)
```

Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "pypy-3.11", "3.13", "3.14", "3.15"]
python-version: ["3.9", "pypy-3.11", "3.13", "3.14", "3.15"]
runs-on: [ubuntu-latest]
cmake-version: ["3.15.x"]

Expand All @@ -124,9 +124,6 @@ jobs:
- python-version: "pypy-3.9"
runs-on: ubuntu-latest
cmake-version: "3.15.x"
- python-version: "3.8"
runs-on: ubuntu-latest
cmake-version: "3.21.x"
- python-version: "3.9"
runs-on: ubuntu-latest
cmake-version: "3.20.x"
Expand All @@ -146,7 +143,7 @@ jobs:
- python-version: "3.15t"
runs-on: macos-latest
cmake-version: "4.2.x"
- python-version: "3.8"
- python-version: "3.9"
runs-on: macos-latest
cmake-version: "3.21.x"
- python-version: "3.9"
Expand All @@ -161,7 +158,7 @@ jobs:
- python-version: "3.11"
runs-on: ubuntu-latest
cmake-version: "3.26.x"
- python-version: "3.8"
- python-version: "3.9"
runs-on: windows-2022
cmake-version: "3.24.x"
# CMake < 4.2 cannot detect Visual Studio 2026, so rows testing older
Expand All @@ -181,7 +178,7 @@ jobs:
- python-version: "3.14"
runs-on: windows-2025-vs2026
cmake-version: "4.2.x"
- python-version: "3.8"
- python-version: "3.9"
runs-on: ubuntu-22.04
cmake-version: "3.15.x"
- python-version: "3.13"
Expand Down Expand Up @@ -276,7 +273,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.11"]
python-version: ["3.9", "3.11"]
# TODO: investigate failure with macos-latest (#1167)
# windows-2022: this job uses CMake 3.21, which cannot detect VS 2026;
# windows-latest/windows-2025 are migrating to VS 2026 by default
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ features over classic Scikit-build:
Current requirements:

- The minimum supported CMake is 3.15
- The minimum supported Python is 3.8 (3.7+ for 0.10.x and older)
- The minimum supported Python is 3.9 (3.8+ for 1.0.x and older)

The recommended interface is the native pyproject builder. Other backends are
also available:
Expand Down
3 changes: 1 addition & 2 deletions docs/configuration/editable.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ Recommendations:
- You need to reinstall to pick up new files.

Resources (via `importlib.resources`) are supported and tested on all supported
Python versions. On Python 3.8, use the `importlib_resources` backport, since
`importlib.resources.files` was added to the standard library in Python 3.9.
Python versions.

```console
# Very experimental rebuild on initial import feature
Expand Down
4 changes: 2 additions & 2 deletions docs/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,12 +415,12 @@ support:

```toml
[tool.scikit-build]
wheel.py-api = "cp38"
wheel.py-api = "cp39"
```

| `wheel.py-api` | Use for | Resulting tags |
| ---------------- | ------------------------------------------------- | ------------------ |
| `"cp38"` | Limited API / Stable ABI extension (CPython 3.8+) | `cp38-abi3` |
| `"cp39"` | Limited API / Stable ABI extension (CPython 3.9+) | `cp39-abi3` |
| `"py3"` | Extension not using the Python API | `py3-none` |
| `"py2.py3"` | Same, but installable on Python 2 as well | `py2.py3-none` |
| `"cp315t"` | Free-threaded stable ABI ([PEP 803][]) | `cp315-abi3t` |
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/downstream/nanobind_example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ endif()

# Try to import all Python components potentially needed by nanobind
find_package(
Python 3.8 REQUIRED
Python 3.9 REQUIRED
COMPONENTS Interpreter Development.Module
OPTIONAL_COMPONENTS Development.SABIModule)

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/downstream/nanobind_example/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "nanobind-example"
version = "0.0.1"
description = "An example minimal project that compiles bindings using nanobind and scikit-build"
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
authors = [
{ name = "Wenzel Jakob", email = "wenzel.jakob@epfl.ch" },
]
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/downstream/pybind11_example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
| pip builds | [![Pip Actions Status][actions-pip-badge]][actions-pip-link] |

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

[gitter-badge]: https://badges.gitter.im/pybind/Lobby.svg
[gitter-link]: https://gitter.im/pybind/Lobby
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/downstream/pybind11_example/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ readme = "README.md"
authors = [
{ name = "My Name", email = "me@email.com" },
]
requires-python = ">=3.8"
requires-python = ">=3.9"
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/cmakelists.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ in your `pyproject.toml`:

```toml
[tool.scikit-build]
wheel.py-api = "cp38"
wheel.py-api = "cp39"
```

The possible values and the resulting wheel tags are covered in
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ print(mk_skbuild_docs())

The default (empty string) will use the default Python version.

You can also set this to "cp38" to enable the CPython 3.8+ Stable
You can also set this to "cp39" to enable the CPython 3.9+ Stable
ABI / Limited API (only on CPython and if the version is sufficient,
otherwise this has no effect). For free-threaded Python, you can use
"cp315t" to enable the free-threaded stable ABI (only on CPython
Expand Down
13 changes: 3 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors = [
]
description = "Build backend for CMake based projects"
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
license = "Apache-2.0"
classifiers = [
"Topic :: Scientific/Engineering",
Expand All @@ -20,7 +20,6 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -37,7 +36,6 @@ dynamic = ["version"]

dependencies = [
"exceptiongroup >=1.0; python_version<'3.11'",
"importlib-resources >=1.3; python_version<'3.9'",
"packaging >=23.2",
"pathspec >=0.12.0",
"tomli >=1.2.2; python_version<'3.11'",
Expand All @@ -52,10 +50,9 @@ wheels = [
"ninja; sys_platform!='win32'",
]
wheel-free-setuptools = [
'setuptools>=70.1; python_version>="3.8"',
'setuptools>=70.1',
]
setuptools = [
'setuptools >=43; python_version<"3.9"',
'setuptools >=45; python_version=="3.9"',
'setuptools >=49; python_version>="3.10" and python_version<"3.12"',
'setuptools >=66.1; python_version>="3.12"',
Expand Down Expand Up @@ -109,7 +106,6 @@ test-core = [
"pip>=24.1; python_version>='3.13'",
"pytest >=7.2,!=9.1.0", # 9.1.0 regression overriding params-fixtures: pytest-dev/pytest#13974
"pytest-subprocess >=1.5",
'setuptools >=43; python_version<"3.9"',
'setuptools >=45; python_version=="3.9"',
'setuptools >=49; python_version>="3.10" and python_version<"3.12"',
'setuptools >=66.1; python_version>="3.12"',
Expand All @@ -129,7 +125,6 @@ test-meta = [
test-numpy = [
{ include-group = "test-core" },
"numpy>=1.24.1; python_version<'3.15' and platform_python_implementation!='PyPy' and (platform_system != 'Windows' or platform_machine != 'ARM64')",
"numpy~=1.24.1; python_version=='3.8' and platform_python_implementation=='PyPy'",
"numpy~=2.0; python_version=='3.9' and platform_python_implementation=='PyPy'",
"numpy~=2.2; python_version=='3.10' and platform_python_implementation=='PyPy'",
"numpy~=2.4.1; python_version=='3.11' and platform_python_implementation=='PyPy'",
Expand Down Expand Up @@ -266,7 +261,7 @@ ignore_missing_imports = true


[tool.pylint]
py-version = "3.8"
py-version = "3.9"
jobs = "0"
reports.output-format = "colorized"
good-names = ["f"]
Expand Down Expand Up @@ -364,8 +359,6 @@ docstring-code-format = true
"tomllib".msg = "Use scikit_build_core._compat.tomllib instead."
"importlib_metadata".msg = "Use importlib.metadata directly instead."
"importlib.metadata.entry_points".msg = "Use scikit_build_core._compat.importlib.metadata.entry_points instead."
"importlib.resources".msg = "Use scikit_build_core._compat.importlib.resources instead."
"importlib_resources".msg = "Use scikit_build_core._compat.importlib.resources instead."
"pyproject_metadata".msg = "Use scikit_build_core._vendor.pyproject_metadata instead."
"setuptools.errors".msg = "Use scikit_build_core._compat.setuptools.errors instead."

Expand Down
5 changes: 1 addition & 4 deletions src/scikit_build_core/_compat/importlib/metadata.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
from __future__ import annotations

__lazy_modules__ = {"typing"}

import importlib.metadata
import sys
import typing

TYPE_CHECKING = False

if TYPE_CHECKING:
if sys.version_info < (3, 10):
from importlib.metadata import EntryPoint

EntryPoints = typing.List[EntryPoint]
EntryPoints = list[EntryPoint]
else:
from importlib.metadata import EntryPoints

Expand Down
16 changes: 0 additions & 16 deletions src/scikit_build_core/_compat/importlib/resources.py

This file was deleted.

8 changes: 0 additions & 8 deletions src/scikit_build_core/_compat/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@

TYPE_CHECKING = False

if sys.version_info < (3, 9):
from typing_extensions import Annotated, get_args, get_origin
else:
from typing import Annotated, get_args, get_origin

if sys.version_info < (3, 11):
if TYPE_CHECKING:
from typing_extensions import Self, assert_never
Expand Down Expand Up @@ -40,12 +35,9 @@ def TypeVar( # noqa: N802


__all__ = [
"Annotated",
"Self",
"TypeVar",
"assert_never",
"get_args",
"get_origin",
]


Expand Down
2 changes: 1 addition & 1 deletion src/scikit_build_core/_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def rich_print(
print(*args_2, flush=True, sep=sep, end=end, file=file) # type: ignore[call-overload]


@functools.lru_cache(maxsize=None)
@functools.cache
def rich_warning(
*args: str,
color: Literal[
Expand Down
2 changes: 1 addition & 1 deletion src/scikit_build_core/build/_file_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def symlink_escapes(path: Path) -> bool:
stays consistent link by link (the last link is the one that gets
resolved).
"""
target = os.readlink(path)
target = os.readlink(path) # noqa: PTH115
if os.path.isabs(target) or os.path.splitdrive(target)[0]: # noqa: PTH117
return True
joined = os.path.normpath(os.path.join(os.path.dirname(path), target)) # noqa: PTH118, PTH120
Expand Down
2 changes: 1 addition & 1 deletion src/scikit_build_core/build/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def get_standard_metadata(
)
except ImportError:
logger.warning(
"Packaging 24.2+ required for license normalization. Please update (Python 3.8+ required)"
"Packaging 24.2+ required for license normalization. Please update"
)

# For scikit-build-core >= 0.11, we set METADATA 2.2 as minimum
Expand Down
7 changes: 5 additions & 2 deletions src/scikit_build_core/builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
f"{(__spec__.parent or '').rsplit('.', 1)[0]}.resources",
f"{__spec__.parent}.generator",
f"{__spec__.parent}.sysconfig",
"importlib",
"importlib.resources",
"platform",
"re",
"shlex",
Expand All @@ -23,11 +25,12 @@
import shlex
import sys
import sysconfig
from importlib.resources import files
from pathlib import Path
from typing import Any

from .. import __version__
from .._compat.importlib import metadata, resources
from .._compat.importlib import metadata
from .._logging import logger
from .._reproducible import get_reproducible_epoch
from ..program_search import _macos_binary_is_x86
Expand Down Expand Up @@ -248,7 +251,7 @@ def _get_entry_point_search_path(self, entry_point: str) -> dict[str, list[Path]
"Loading search paths {} from entry-points: {}", entry_point, len(eps)
)
for ep in eps:
ep_value = _sanitize_path(resources.files(ep.load()))
ep_value = _sanitize_path(files(ep.load()))
logger.debug("{}: {} -> {}", ep.name, ep.value, ep_value)
if ep_value:
search_paths[ep.name] = ep_value
Expand Down
Loading
Loading