Skip to content

Commit

Permalink
support build arguments via env var
Browse files Browse the repository at this point in the history
this is needed by the move to the new build systems, which seem to have no easy way of specifying command line arguments..
  • Loading branch information
totaam committed Nov 11, 2024
1 parent bb42b03 commit 9b3d73e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,12 @@ def pkg_config_version(req_version: str, pkgname: str) -> bool:
return LooseVersion(out) >= LooseVersion(req_version)


argv = sys.argv + list(filter(len, os.environ.get("XPRA_EXTRA_BUILD_ARGS", "").split(" ")))
DEFAULT = True
if "--minimal" in sys.argv:
sys.argv.remove("--minimal")
if "--minimal" in argv:
argv.remove("--minimal")
DEFAULT = False
skip_build = "--skip-build" in sys.argv
skip_build = "--skip-build" in argv
ARCH = get_status_output(["uname", "-m"])[1].strip("\n\r")
ARM = ARCH.startswith("arm") or ARCH.startswith("aarch")
RISCV = ARCH.startswith("riscv")
Expand Down Expand Up @@ -427,7 +428,7 @@ def has_header_file(name, isdir=False) -> bool:


def filter_argv() -> None:
for arg in sys.argv:
for arg in argv:
matched = False
for x in ("rpath", "ssl-cert", "ssl-key", "install", "share-xpra", "dummy-driver-version"):
varg = f"--{x}="
Expand Down

0 comments on commit 9b3d73e

Please sign in to comment.