Skip to content

Commit

Permalink
#280 detect minifier, default to 'copy' if not found
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jan 21, 2024
1 parent 75652df commit b04f116
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,14 @@ def sdist():
)


def detect_minifier() -> str:
cmd = "yuicompressor" if sys.platform.startswith("win") else "uglifyjs"
from shutil import which
if not which(cmd):
return ""
return cmd


def main(args):
def help():
cmd = args[0]
Expand All @@ -547,7 +555,7 @@ def help():
record_vcs_info()
except Exception:
print("Warning: src_info is missing")
minifier = "yuicompressor" if sys.platform.startswith("win") else "uglifyjs"
minifier = detect_minifier()
root_dir = ""
install_dir = os.path.normpath(os.path.join(sys.prefix, "share/xpra/www"))
# Platform-dependent configuration file location:
Expand Down

0 comments on commit b04f116

Please sign in to comment.