mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
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:
33
tools/make_global.py
Executable file
33
tools/make_global.py
Executable 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())
|
||||
Reference in New Issue
Block a user