diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -1627,10 +1627,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 = []