contrib/packaging/hgpackaging/pyoxidizer.py
changeset 45685 57b5452a55d5
parent 44763 94f4f2ec7dee
child 45922 37bcd7f5a543
--- a/contrib/packaging/hgpackaging/pyoxidizer.py	Thu Oct 08 13:19:18 2020 -0700
+++ b/contrib/packaging/hgpackaging/pyoxidizer.py	Sun Oct 04 22:32:41 2020 -0700
@@ -42,10 +42,10 @@
 ]
 
 STAGING_RULES_APP = [
-    ('mercurial/helptext/**/*.txt', 'helptext/'),
-    ('mercurial/defaultrc/*.rc', 'defaultrc/'),
-    ('mercurial/locale/**/*', 'locale/'),
-    ('mercurial/templates/**/*', 'templates/'),
+    ('lib/mercurial/helptext/**/*.txt', 'helptext/'),
+    ('lib/mercurial/defaultrc/*.rc', 'defaultrc/'),
+    ('lib/mercurial/locale/**/*', 'locale/'),
+    ('lib/mercurial/templates/**/*', 'templates/'),
 ]
 
 STAGING_EXCLUDES_WINDOWS = [
@@ -109,11 +109,9 @@
     # Now assemble all the files from PyOxidizer into the staging directory.
     shutil.copytree(build_dir, out_dir)
 
-    # Move some of those files around.
+    # Move some of those files around. We can get rid of this once Mercurial
+    # is taught to use the importlib APIs for reading resources.
     process_install_rules(STAGING_RULES_APP, build_dir, out_dir)
-    # Nuke the mercurial/* directory, as we copied resources
-    # to an appropriate location just above.
-    shutil.rmtree(out_dir / "mercurial")
 
     # We also need to run setup.py build_doc to produce html files,
     # as they aren't built as part of ``pip install``.