Comments
Patch
@@ -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,
@@ -218,3 +223,10 @@
# See https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-redirection.
with (staging_dir / 'hg.exe.local').open('ab'):
pass
+
+ # 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()