Skip to content

Commit bdf5a4a

Browse files
henryiiiLecrisUT
andauthored
chore: add 3.14 beta 1 support (#1074)
Trying this out. --------- Signed-off-by: Henry Schreiner <[email protected]> Signed-off-by: Cristian Le <[email protected]> Co-authored-by: Cristian Le <[email protected]>
1 parent b64c807 commit bdf5a4a

File tree

9 files changed

+50
-15
lines changed

9 files changed

+50
-15
lines changed

.distro/python-scikit-build-core.spec

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
%global debug_package %{nil}
22

3+
# On epel python hatch/trove classifier check may fail because of old package
4+
# Fedora checks should be sufficient though.
5+
%bcond no_classifier_check 0%{?rhel}
6+
37
Name: python-scikit-build-core
48
Version: 0.0.0
59
Release: %autorelease
@@ -46,10 +50,16 @@ cp -p src/scikit_build_core/_vendor/pyproject_metadata/LICENSE LICENSE-pyproject
4650

4751

4852
%generate_buildrequires
53+
%if %{with no_classifier_check}
54+
export HATCH_METADATA_CLASSIFIERS_NO_VERIFY=1
55+
%endif
4956
%pyproject_buildrequires -x test,test-meta,test-numpy
5057

5158

5259
%build
60+
%if %{with no_classifier_check}
61+
export HATCH_METADATA_CLASSIFIERS_NO_VERIFY=1
62+
%endif
5363
%pyproject_wheel
5464

5565

.github/workflows/ci.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ jobs:
5252
strategy:
5353
fail-fast: false
5454
matrix:
55-
python-version: ["3.8", "pypy-3.10", "3.13"]
56-
runs-on: [ubuntu-latest, macos-13]
55+
python-version: ["3.8", "pypy-3.10", "3.13", "3.14"]
56+
runs-on: [ubuntu-latest, macos-14]
5757
cmake-version: ["3.15.x"]
5858

5959
include:
@@ -76,7 +76,7 @@ jobs:
7676
runs-on: macos-13
7777
cmake-version: "3.18.x"
7878
- python-version: "3.12"
79-
runs-on: macos-14
79+
runs-on: macos-13
8080
cmake-version: "3.29.x"
8181
- python-version: "3.10"
8282
runs-on: ubuntu-latest
@@ -90,6 +90,10 @@ jobs:
9090
- python-version: "3.12"
9191
runs-on: windows-latest
9292
cmake-version: "3.26.x"
93+
# TODO: CMake doesn't work with beta 1 on Windows
94+
# - python-version: "3.14"
95+
# runs-on: windows-latest
96+
# cmake-version: "4.0.x"
9397
- python-version: "3.13"
9498
runs-on: windows-latest
9599
cmake-version: "3.26.x"
@@ -99,9 +103,6 @@ jobs:
99103
- python-version: "3.13"
100104
runs-on: ubuntu-24.04-arm
101105
cmake-version: "3.31.x"
102-
- python-version: "3.14"
103-
runs-on: ubuntu-latest
104-
cmake-version: "3.30.x"
105106
- python-version: "3.12"
106107
runs-on: windows-11-arm
107108
cmake-version: "4.0"

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ classifiers = [
2626
"Programming Language :: Python :: 3.11",
2727
"Programming Language :: Python :: 3.12",
2828
"Programming Language :: Python :: 3.13",
29+
"Programming Language :: Python :: 3.14",
2930
"Development Status :: 4 - Beta",
3031
"Typing :: Typed",
3132
]
@@ -208,6 +209,7 @@ messages_control.disable = [
208209
"unused-argument", # Handled by Ruff
209210
"redefined-builtin", # ExceptionGroup is a builtin
210211
"using-exception-groups-in-unsupported-version", # We are using a backport
212+
"duplicate-code", # Trips up on version
211213
]
212214

213215

@@ -305,6 +307,7 @@ known-local-folder = ["pathutils"]
305307
"importlib.resources".msg = "Use scikit_build_core._compat.importlib.resources instead."
306308
"importlib_resources".msg = "Use scikit_build_core._compat.importlib.resources instead."
307309
"pyproject_metadata".msg = "Use scikit_build_core._vendor.pyproject_metadata instead."
310+
"argparse.ArgumentParser".msg = "Use scikit_build_core._compat.argparse instead."
308311

309312

310313
[tool.ruff.lint.per-file-ignores]
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from __future__ import annotations
2+
3+
import argparse
4+
import functools
5+
import sys
6+
7+
__all__ = ["ArgumentParser"]
8+
9+
10+
def __dir__() -> list[str]:
11+
return __all__
12+
13+
14+
ArgumentParser = functools.partial(argparse.ArgumentParser)
15+
16+
if sys.version_info >= (3, 14):
17+
ArgumentParser = functools.partial(
18+
ArgumentParser, color=True, suggest_on_error=True
19+
)

src/scikit_build_core/build/__main__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from typing import Literal
55

66
from .._compat import tomllib
7+
from .._compat.argparse import ArgumentParser
78
from .._logging import rich_warning
89
from ..builder._load_provider import process_dynamic_metadata
910
from . import (
@@ -48,7 +49,8 @@ def get_requires(mode: Literal["sdist", "wheel", "editable"]) -> None:
4849

4950

5051
def main() -> None:
51-
parser = argparse.ArgumentParser(
52+
parser = ArgumentParser(
53+
allow_abbrev=False,
5254
description="Build backend utilities",
5355
)
5456

src/scikit_build_core/builder/wheel_tag.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ def as_tags_set(self) -> frozenset[packaging.tags.Tag]:
152152

153153

154154
if __name__ == "__main__":
155-
import argparse
155+
from .._compat.argparse import ArgumentParser
156156

157-
parser = argparse.ArgumentParser()
157+
parser = ArgumentParser(allow_abbrev=False)
158158
parser.add_argument(
159159
"--archs",
160160
nargs="*",

src/scikit_build_core/file_api/_cattrs_converter.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ def load_reply_dir(reply_dir: Path) -> Index:
6161

6262

6363
if __name__ == "__main__":
64-
import argparse
64+
from .._compat.argparse import ArgumentParser
6565

6666
rich_print: Callable[[object], None]
6767
try:
6868
from rich import print as rich_print
6969
except ModuleNotFoundError:
7070
rich_print = builtins.print
7171

72-
parser = argparse.ArgumentParser()
72+
parser = ArgumentParser(allow_abbrev=False)
7373
parser.add_argument("reply_dir", type=Path, help="Path to the reply directory")
7474
args = parser.parse_args()
7575

src/scikit_build_core/file_api/query.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ def stateless_query(build_dir: Path) -> Path:
2323

2424

2525
if __name__ == "__main__":
26-
import argparse
26+
from .._compat.argparse import ArgumentParser
2727

28-
parser = argparse.ArgumentParser()
28+
parser = ArgumentParser(allow_abbrev=False)
2929
parser.add_argument("build_dir", type=Path, help="Path to the build directory")
3030
args = parser.parse_args()
3131

src/scikit_build_core/file_api/reply.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,15 @@ def load_reply_dir(path: Path) -> Index:
111111

112112

113113
if __name__ == "__main__":
114-
import argparse
114+
from .._compat.argparse import ArgumentParser
115115

116116
rich_print: Callable[[object], None]
117117
try:
118118
from rich import print as rich_print
119119
except ModuleNotFoundError:
120120
rich_print = builtins.print
121121

122-
parser = argparse.ArgumentParser()
122+
parser = ArgumentParser(allow_abbrev=False)
123123
parser.add_argument("reply_dir", type=Path, help="Path to the reply directory")
124124
args = parser.parse_args()
125125

0 commit comments

Comments
 (0)