Commits

Paul Tonelli  committed 5ccc01d

[setup] py2exe: use os.path to remove extensions instead of f[-4].

  • Participants
  • Parent commits 149813d
  • Branches stable

Comments (0)

Files changed (1)

         hgextpath = dirname(hgext.__file__)
         import glob
         for f in glob.glob(join(hgextpath, '*.py*')) +  glob.glob(join(hgextpath, '*/*.py*')):
-            parts = f[len(hgextpath):-4].split(os.sep)
-            parts = [i for i in parts if i.strip() and i != '__init__' ]
+            tmp_f = os.path.splitext(os.path.relpath(f, hgextpath))[0]
+            parts = [i for i in tmp_f.split(os.sep) if i.strip() and i != '__init__' ]
             m = '.'.join(['hgext']+parts)
             extra_include.append(m)
         # end of ugly hack