chore: use scikit-build-core for the build (#5598)

* chore: use scikit-build-core for the build

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* fix: support tests job

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* refactor: use tomlkit instead of manual parsing

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* tests: add tests for output

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* chore: remove more unused files

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* fix: restore global pin

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* fix: test and fix pinning

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
Henry Schreiner
2025-05-15 14:39:23 -04:00
committed by GitHub
parent 6aa3b335f4
commit af231a6054
17 changed files with 371 additions and 469 deletions

33
tools/make_global.py Executable file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env -S uv run -q
# /// script
# dependencies = ["tomlkit"]
# ///
from __future__ import annotations
from pathlib import Path
import tomlkit
DIR = Path(__file__).parent.resolve()
PYPROJECT = DIR.parent / "pyproject.toml"
def get_global() -> str:
pyproject = tomlkit.parse(PYPROJECT.read_text())
del pyproject["tool"]["scikit-build"]["generate"]
del pyproject["project"]["entry-points"]
del pyproject["project"]["scripts"]
del pyproject["tool"]["scikit-build"]["metadata"]["optional-dependencies"]
pyproject["project"]["name"] = "pybind11-global"
pyproject["tool"]["scikit-build"]["experimental"] = True
pyproject["tool"]["scikit-build"]["wheel"]["install-dir"] = "/data"
pyproject["tool"]["scikit-build"]["wheel"]["packages"] = []
result = tomlkit.dumps(pyproject)
assert isinstance(result, str)
return result
if __name__ == "__main__":
print(get_global())