changeset 43607:a2f28a8746bf

packaging: remove hg-ssh.8.html from Inno installer We don't ship hg-ssh because it requires a python.exe to run, which we don't ship. So it doesn't make sense to ship the HTML documentation for this tool. This change makes the Inno install layout more consistent with WiX, which doesn't ship this file. Functionality for removing files has been made generic, in anticipation of future expansion. Differential Revision: https://phab.mercurial-scm.org/D7169
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 23 Oct 2019 13:21:35 -0700
parents 14ce03e13508
children 2574330dd0f6
files contrib/packaging/hgpackaging/py2exe.py
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/packaging/hgpackaging/py2exe.py	Wed Oct 23 13:00:14 2019 -0700
+++ b/contrib/packaging/hgpackaging/py2exe.py	Wed Oct 23 13:21:35 2019 -0700
@@ -52,6 +52,11 @@
     ('COPYING', 'Copying.txt'),
 ]
 
+# List of paths to exclude from the staging area.
+STAGING_EXCLUDES = [
+    'doc/hg-ssh.8.html',
+]
+
 
 def build_py2exe(
     source_dir: pathlib.Path,
@@ -212,3 +217,10 @@
     files.
     """
     process_install_rules(STAGING_RULES, source_dir, staging_dir)
+
+    # Purge any files we don't want to be there.
+    for f in STAGING_EXCLUDES:
+        p = staging_dir / f
+        if p.exists():
+            print('removing %s' % p)
+            p.unlink()