Skip to content

Commit 4fbd3b7

Browse files
henryiiiLecrisUT
andauthored
feat: update vendored pyproject-metadata (#917)
- [x] Make sure it works - [x] Support PEP 639 - [x] Support validation - [x] Support multierrors --------- Signed-off-by: Henry Schreiner <[email protected]> Signed-off-by: Cristian Le <[email protected]> Co-authored-by: Cristian Le <[email protected]>
1 parent ac11716 commit 4fbd3b7

25 files changed

+1604
-472
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ Version: 0.0.0
1313
Release: %autorelease
1414
Summary: Build backend for CMake based projects
1515

16-
License: Apache-2.0
16+
# The main project is licensed under Apache-2.0, but it has a vendored project
17+
# src/scikit_build_core/_vendor/pyproject_metadata: MIT
18+
# https://github.com/scikit-build/scikit-build-core/issues/933
19+
License: Apache-2.0 AND MIT
1720
URL: https://github.com/scikit-build/scikit-build-core
1821
Source: %{pypi_source scikit_build_core}
1922

@@ -38,6 +41,7 @@ Recommends: (ninja-build or make)
3841
Recommends: python3-scikit-build-core+pyproject = %{version}-%{release}
3942
Suggests: ninja-build
4043
Suggests: gcc
44+
Provides: bundled(python3dist(pyproject-metadata))
4145
BuildArch: noarch
4246
%description -n python3-scikit-build-core %_description
4347

@@ -63,6 +67,8 @@ It makes sure the dependencies are installed.
6367

6468
%prep
6569
%autosetup -n scikit_build_core-%{version}
70+
# Rename the bundled license so that it can be installed together
71+
cp -p src/scikit_build_core/_vendor/pyproject_metadata/LICENSE LICENSE-pyproject-metadata
6672

6773

6874
%generate_buildrequires
@@ -87,7 +93,7 @@ It makes sure the dependencies are installed.
8793

8894

8995
%files -n python3-scikit-build-core -f %{pyproject_files}
90-
%license LICENSE
96+
%license LICENSE LICENSE-pyproject-metadata
9197
%doc README.md
9298

9399

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ repos:
8282
- ninja
8383
- nox
8484
- orjson
85-
- packaging
85+
- packaging>=24.2
8686
- pytest
8787
- pytest-subprocess
8888
- rich

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,10 @@ wheel.expand-macos-universal-tags = false
236236
# to "/platlib", "/data", "/headers", and "/scripts".
237237
wheel.install-dir = ""
238238

239-
# A list of license files to include in the wheel. Supports glob patterns.
240-
wheel.license-files = ["LICEN[CS]E*", "COPYING*", "NOTICE*", "AUTHORS*"]
239+
# A list of license files to include in the wheel. Supports glob patterns. The
240+
# default is ``["LICEN[CS]E*", "COPYING*", "NOTICE*", "AUTHORS*"]``. Must not be
241+
# set if ``project.license-files`` is set.
242+
wheel.license-files = ""
241243

242244
# If set to True (the default), CMake will be run before building the wheel.
243245
wheel.cmake = true

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def pylint(session: nox.Session) -> None:
4141
"""
4242
# This needs to be installed into the package environment, and is slower
4343
# than a pre-commit check
44-
session.install("-e.[dev,test,test-meta]", "pylint==3.2.*")
44+
session.install("-e.[dev,test,test-meta]", "pylint==3.3.*")
4545
session.run("pylint", "--version")
4646
session.run("pylint", "scikit_build_core", *session.posargs)
4747

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ filterwarnings = [
144144
"default:The distutils package is deprecated and slated for removal:DeprecationWarning", # Caused by setuptools sometimes
145145
"default:The distutils.sysconfig module is deprecated, use sysconfig instead:DeprecationWarning", # Caused by setuptools sometimes
146146
"default:check_home argument is deprecated and ignored.:DeprecationWarning", # Caused by setuptools sometimes
147+
"ignore::scikit_build_core._vendor.pyproject_metadata.errors.ConfigurationWarning",
147148
]
148149
log_cli_level = "info"
149150
pythonpath = ["tests/utils"]
@@ -203,6 +204,7 @@ messages_control.disable = [
203204
"broad-except",
204205
"unused-argument", # Handled by Ruff
205206
"redefined-builtin", # ExceptionGroup is a builtin
207+
"using-exception-groups-in-unsupported-version", # We are using a backport
206208
]
207209

208210

0 commit comments

Comments
 (0)