packaging: remove hg-ssh.8.html from Inno installer
authorGregory Szorc <gregory.szorc@gmail.com>
Wed, 23 Oct 2019 13:21:35 -0700
changeset 43607 a2f28a8746bf
parent 43606 14ce03e13508
child 43608 2574330dd0f6
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
contrib/packaging/hgpackaging/py2exe.py
--- 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()