equal
deleted
inserted
replaced
40 ('doc/style.css', 'doc/'), |
40 ('doc/style.css', 'doc/'), |
41 ('COPYING', 'Copying.txt'), |
41 ('COPYING', 'Copying.txt'), |
42 ] |
42 ] |
43 |
43 |
44 STAGING_RULES_APP = [ |
44 STAGING_RULES_APP = [ |
45 ('mercurial/helptext/**/*.txt', 'helptext/'), |
45 ('lib/mercurial/helptext/**/*.txt', 'helptext/'), |
46 ('mercurial/defaultrc/*.rc', 'defaultrc/'), |
46 ('lib/mercurial/defaultrc/*.rc', 'defaultrc/'), |
47 ('mercurial/locale/**/*', 'locale/'), |
47 ('lib/mercurial/locale/**/*', 'locale/'), |
48 ('mercurial/templates/**/*', 'templates/'), |
48 ('lib/mercurial/templates/**/*', 'templates/'), |
49 ] |
49 ] |
50 |
50 |
51 STAGING_EXCLUDES_WINDOWS = [ |
51 STAGING_EXCLUDES_WINDOWS = [ |
52 "doc/hg-ssh.8.html", |
52 "doc/hg-ssh.8.html", |
53 ] |
53 ] |
107 shutil.rmtree(out_dir) |
107 shutil.rmtree(out_dir) |
108 |
108 |
109 # Now assemble all the files from PyOxidizer into the staging directory. |
109 # Now assemble all the files from PyOxidizer into the staging directory. |
110 shutil.copytree(build_dir, out_dir) |
110 shutil.copytree(build_dir, out_dir) |
111 |
111 |
112 # Move some of those files around. |
112 # Move some of those files around. We can get rid of this once Mercurial |
|
113 # is taught to use the importlib APIs for reading resources. |
113 process_install_rules(STAGING_RULES_APP, build_dir, out_dir) |
114 process_install_rules(STAGING_RULES_APP, build_dir, out_dir) |
114 # Nuke the mercurial/* directory, as we copied resources |
|
115 # to an appropriate location just above. |
|
116 shutil.rmtree(out_dir / "mercurial") |
|
117 |
115 |
118 # We also need to run setup.py build_doc to produce html files, |
116 # We also need to run setup.py build_doc to produce html files, |
119 # as they aren't built as part of ``pip install``. |
117 # as they aren't built as part of ``pip install``. |
120 # This will fail if docutils isn't installed. |
118 # This will fail if docutils isn't installed. |
121 subprocess.run( |
119 subprocess.run( |