Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8.2, 0.8.3, and 0.9

stable setup: help py2exe find win32com.shell

Borrow some modulefinder magic from Mercurial's setup.py script

Fixes #514

Changeset ad7d3f536c6f

Parent 7cda7b77c69b

by Steve Borho

Changes to one file · Browse files at ad7d3f536c6f Showing diff from parent 7cda7b77c69b Diff from another changeset...

Change 1 of 1 Show Entire File setup.py Stacked
 
62
63
64
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
67
68
 
62
63
64
 
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
@@ -62,7 +62,24 @@
  extra = {}   hgextmods = []   - try: import py2exe + # py2exe needs to be installed to work + try: + import py2exe + + # Help py2exe to find win32com.shell + try: + import modulefinder + import win32com + for p in win32com.__path__[1:]: # Take the path to win32comext + modulefinder.AddPackagePath("win32com", p) + pn = "win32com.shell" + __import__(pn) + m = sys.modules[pn] + for p in m.__path__[1:]: + modulefinder.AddPackagePath(pn, p) + except ImportError: + pass +   except ImportError:   if '--version' not in sys.argv:   raise