mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +00:00
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user