Skip to content

Commit

Permalink
show what we exclude and why
Browse files Browse the repository at this point in the history
do exclude the win32 service in light builds
  • Loading branch information
totaam committed Jan 14, 2025
1 parent c03bd75 commit 12af226
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
1 change: 1 addition & 0 deletions packaging/MSWindows/BUILD.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def get_build_args(args) -> list[str]:
"docs",
"qt6_client",
"websockets_browser_cookie",
"service",
):
xpra_args.append(f"--without-{option}")
xpra_args.append("--with-Os")
Expand Down
24 changes: 18 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,13 +912,24 @@ def add_packages(*pkgs: str) -> None:
for x in filtered_pkgs:
if x not in packages:
packages.append(x)
excluded = tuple(pkg for pkg in pkgs if any(pkg.startswith(exclude) for exclude in excludes))
if excluded:
print(f"add_packages({pkgs}) {excluded=} using {excludes=}")
add_modules(*filtered_pkgs)


def add_modules(*mods: str) -> None:
def add(v):
if v not in modules and not any(v.startswith(exclude) for exclude in excludes):
modules.append(v)
def add(v: str) -> None:
if v in modules:
return
excluded = tuple(exclude for exclude in excludes if v.startswith(exclude))
if excluded:
print(f"not adding {v!r}, excluded by {excluded}")
return
modules.append(v)
excluded = tuple(mod for mod in mods if any(mod.startswith(exclude) for exclude in excludes))
if excluded:
print(f"add_modules({mods}) {excluded=} using {excludes=}")
do_add_modules(add, *mods)


Expand Down Expand Up @@ -2417,7 +2428,7 @@ def noop(*_args, **_kwargs): # pylint: disable=function-redefined
if not OSX and not WIN32:
scripts.append("fs/bin/run_scaled")

toggle_packages(WIN32, "xpra/platform/win32/service")
toggle_packages(WIN32 and service_ENABLED, "xpra/platform/win32/service")

if data_ENABLED:
if not is_openSUSE():
Expand Down Expand Up @@ -2452,7 +2463,7 @@ def noop(*_args, **_kwargs): # pylint: disable=function-redefined
toggle_packages(dbus_ENABLED, "xpra.dbus")
toggle_packages(server_ENABLED or client_ENABLED, "xpra.auth")
toggle_packages(server_ENABLED or proxy_ENABLED, "xpra.server")
toggle_packages(proxy_ENABLED, "xpra.server.proxy")
toggle_packages(proxy_ENABLED, "xpra.server.proxy", "xpra.scripts.proxy")
toggle_packages(server_ENABLED, "xpra.server.window")
toggle_packages(server_ENABLED and rfb_ENABLED, "xpra.server.rfb")
toggle_packages(server_ENABLED or shadow_ENABLED, "xpra.server.mixins", "xpra.server.source")
Expand Down Expand Up @@ -2788,7 +2799,7 @@ def ax(base):
ace("xpra.platform.posix.shadow_server")
if scripts_ENABLED:
ax("xpra.scripts")
if WIN32:
if WIN32 and service_ENABLED:
ace("xpra.platform.win32.service")
if server_ENABLED or client_ENABLED:
ax("xpra.auth")
Expand All @@ -2798,6 +2809,7 @@ def ax(base):
ax("xpra.server.mixins")
if proxy_ENABLED:
ax("xpra.server.proxy")
ax("xpra.scripts.proxy")
if rfb_ENABLED:
ax("xpra.server.rfb")
if shadow_ENABLED:
Expand Down

0 comments on commit 12af226

Please sign in to comment.