chore: add PEP 723 metadata for various bin/ scripts, drop bin dependency group (#2819)
* Add PEP 723 metadata for various `bin` scripts * Use a subprocess to install chromium * Regenerate image * Update shebangs Co-Authored-By: Henry Schreiner <HenrySchreinerIII@gmail.com> * Add cibuildwheel local dependency for some scripts Co-Authored-By: Henry Schreiner <HenrySchreinerIII@gmail.com> * Remove `bin` dependency group fully * Add CSS for styling the diagram Co-Authored-By: Joe Rickerby <1244307+joerick@users.noreply.github.com> * Restore image to original * Install `uv` for PyLint to find it * Drop setup-python too in favour of setup-uv * Revert "Drop setup-python too in favour of setup-uv" This reverts commit 663db5c253f18bd09229ea5dbf92f7f6aa8ebf1c. * Make `uv` venv backend for nox optional again --------- Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com> Co-authored-by: Joe Rickerby <1244307+joerick@users.noreply.github.com>
This commit is contained in:
co-authored by
Henry Schreiner
Joe Rickerby
parent
46558a4e24
commit
f86700db67
+8
-17
@@ -69,12 +69,10 @@ def update_constraints(session: nox.Session) -> None:
|
||||
Update the dependencies inplace.
|
||||
"""
|
||||
|
||||
session.install("-e.", "click")
|
||||
|
||||
resources = Path("cibuildwheel/resources")
|
||||
|
||||
if session.venv_backend != "uv":
|
||||
session.install("uv>=0.1.23")
|
||||
session.install("uv>=0.9")
|
||||
|
||||
# CUSTOM_COMPILE_COMMAND is a pip-compile option that tells users how to
|
||||
# regenerate the constraints files
|
||||
@@ -108,8 +106,7 @@ def update_constraints(session: nox.Session) -> None:
|
||||
|
||||
tmp_file = Path(session.create_tmp()) / "constraints-pyodide.in"
|
||||
|
||||
session.run(
|
||||
"python",
|
||||
session.install_and_run_script(
|
||||
"bin/generate_pyodide_constraints.py",
|
||||
"--output-file",
|
||||
tmp_file,
|
||||
@@ -135,13 +132,11 @@ def update_pins(session: nox.Session) -> None:
|
||||
Update the python, docker, virtualenv, node, and python-build-standalone
|
||||
version pins inplace.
|
||||
"""
|
||||
pyproject = nox.project.load_toml()
|
||||
session.install("-e.", *nox.project.dependency_groups(pyproject, "bin"))
|
||||
session.run("python", "bin/update_pythons.py", "--force")
|
||||
session.run("python", "bin/update_docker.py")
|
||||
session.run("python", "bin/update_virtualenv.py", "--force")
|
||||
session.run("python", "bin/update_nodejs.py", "--force")
|
||||
session.run("python", "bin/update_python_build_standalone.py")
|
||||
session.install_and_run_script("bin/update_pythons.py", "--force")
|
||||
session.install_and_run_script("bin/update_docker.py")
|
||||
session.install_and_run_script("bin/update_virtualenv.py", "--force")
|
||||
session.install_and_run_script("bin/update_nodejs.py", "--force")
|
||||
session.install_and_run_script("bin/update_python_build_standalone.py")
|
||||
|
||||
|
||||
@nox.session(default=False, reuse_venv=True, tags=["update"])
|
||||
@@ -189,11 +184,7 @@ def update_how_it_works_image(session: nox.Session) -> None:
|
||||
"""
|
||||
Generate the how it works image.
|
||||
"""
|
||||
pyproject = nox.project.load_toml()
|
||||
session.install("-e.", *nox.project.dependency_groups(pyproject, "docs"))
|
||||
session.install("playwright")
|
||||
session.run("playwright", "install", "chromium")
|
||||
session.run("python", "bin/update_how_it_works_image.py")
|
||||
session.install_and_run_script("bin/update_how_it_works_image.py")
|
||||
|
||||
|
||||
@nox.session(default=False)
|
||||
|
||||
Reference in New Issue
Block a user