[Updated] D8858: packaging: include templates with their package as key in package_data

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Thu Aug 6 00:48:14 UTC 2020


Closed by commit rHGe2320bb7a99f: packaging: include templates with their package as key in package_data (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8858?vs=22241&id=22286

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8858/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8858

AFFECTED FILES
  setup.py

CHANGE DETAILS

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1635,10 +1635,8 @@
 
 for root in ('templates',):
     for curdir, dirs, files in os.walk(os.path.join('mercurial', root)):
-        curdir = curdir.split(os.sep, 1)[1]
-        for f in filter(ordinarypath, files):
-            f = os.path.join(curdir, f)
-            packagedata['mercurial'].append(f)
+        packagename = curdir.replace(os.sep, '.')
+        packagedata[packagename] = list(filter(ordinarypath, files))
 
 datafiles = []
 



To: martinvonz, #hg-reviewers, indygreg
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200806/e22b4eea/attachment-0002.html>


More information about the Mercurial-patches mailing list