Introduce build-deps.py, deprecate build-deps.cmd

Moving to Python to make Windows build scripts more maintainable.

It's intended to be a drop-in replacement, so it should be possible to just switch `.\build-deps.cmd` to `python build-deps.py`, keeping exactly the same arguments and behaviour will be the same.
`build-deps.cmd` is deprecated, but not yet removed, but will be shortly after more testing.

Other batch files will be migrated to Python shortly after too.
This commit is contained in:
Andrej730
2026-09-09 16:26:01 +05:00
parent b588d52ebe
commit bfce5b9415
14 changed files with 2016 additions and 35 deletions
+3 -2
View File
@@ -9,13 +9,14 @@ import platform
import re
import shutil
import subprocess
import sys
import zipfile
from pathlib import Path
from zipfile import ZipFile
def is_arm64() -> bool:
arch = os.environ.get("TARGET_ARCH", "").lower()
arch = os.environ.get("VS_PLATFORM", "").lower()
if arch in ("arm64", "aarch64"):
return True
if arch in ("x64", "amd64", "x86_64"):
@@ -217,7 +218,7 @@ def build() -> None:
os.environ["PYTHON_VERSION"] = python_version
print(f"Building for Python {python_version}...")
subprocess.run(
[str(REPO_WIN / "build-deps.cmd"), build_generator(), "Release"],
[sys.executable, str(REPO_WIN / "build-deps.py"), build_generator(), "Release"],
check=True,
text=True,
input="y\n",