Mercurial > hg
comparison contrib/packaging/hgpackaging/py2exe.py @ 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 |
comparison
equal
deleted
inserted
replaced
43606:14ce03e13508 | 43607:a2f28a8746bf |
---|---|
50 ('mercurial/templates/**/*', 'Templates/'), | 50 ('mercurial/templates/**/*', 'Templates/'), |
51 ('CONTRIBUTORS', 'Contributors.txt'), | 51 ('CONTRIBUTORS', 'Contributors.txt'), |
52 ('COPYING', 'Copying.txt'), | 52 ('COPYING', 'Copying.txt'), |
53 ] | 53 ] |
54 | 54 |
55 # List of paths to exclude from the staging area. | |
56 STAGING_EXCLUDES = [ | |
57 'doc/hg-ssh.8.html', | |
58 ] | |
59 | |
55 | 60 |
56 def build_py2exe( | 61 def build_py2exe( |
57 source_dir: pathlib.Path, | 62 source_dir: pathlib.Path, |
58 build_dir: pathlib.Path, | 63 build_dir: pathlib.Path, |
59 python_exe: pathlib.Path, | 64 python_exe: pathlib.Path, |
210 | 215 |
211 This allows packaging to simply walk a directory tree to find source | 216 This allows packaging to simply walk a directory tree to find source |
212 files. | 217 files. |
213 """ | 218 """ |
214 process_install_rules(STAGING_RULES, source_dir, staging_dir) | 219 process_install_rules(STAGING_RULES, source_dir, staging_dir) |
220 | |
221 # Purge any files we don't want to be there. | |
222 for f in STAGING_EXCLUDES: | |
223 p = staging_dir / f | |
224 if p.exists(): | |
225 print('removing %s' % p) | |
226 p.unlink() |