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

setup: put back hgext in py2exe path

Changeset b994c8abe615

Parent 9bb13b38dac3

by Steve Borho

Changes to one file · Browse files at b994c8abe615 Showing diff from parent 9bb13b38dac3 Diff from another changeset...

Change 1 of 4 Show Entire File setup.py Stacked
 
16
17
18
19
 
20
 
21
22
23
 
25
26
27
 
 
 
 
 
28
29
30
31
32
33
 
 
 
 
 
 
 
34
35
36
 
46
47
48
49
 
50
51
52
 
58
59
60
61
 
62
63
64
 
16
17
18
 
19
20
21
22
23
24
 
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
 
59
60
61
 
62
63
64
65
 
71
72
73
 
74
75
76
77
@@ -16,8 +16,9 @@
  # Specific definitios for Windows NT-alike installations   _scripts = []   _data_files = [] - _packages = ['hggtk', 'thgutil'] + _packages = ['hggtk', 'hggtk.logview', 'thgutil', 'thgutil.iniparse']   extra = {} + hgextmods = []     try: import py2exe   except ImportError: @@ -25,12 +26,24 @@
  raise     if 'py2exe' in sys.argv: + # FIXME: quick hack to include installed hg extensions in py2exe binary + import hgext + hgextdir = os.path.dirname(hgext.__file__) + hgextmods = set(["hgext." + os.path.splitext(f)[0] + for f in os.listdir(hgextdir)])   _data_files = [(root, [os.path.join(root, file_) for file_ in files])   for root, dirs, files in os.walk('icons')]     # add library files to support PyGtk-based dialogs/windows   includes = ['dbhash', 'pango', 'atk', 'pangocairo', 'cairo', 'gobject']   + # Manually include other modules py2exe can't find by itself. + if 'hgext.highlight' in hgextmods: + includes += ['pygments.*', 'pygments.lexers.*', 'pygments.formatters.*', + 'pygments.filters.*', 'pygments.styles.*'] + if 'hgext.patchbomb' in hgextmods: + includes += ['email.*', 'email.mime.*'] +   extra['options'] = {   "py2exe" : {   # This is one way to ensure that hgtk can find its icons when @@ -46,7 +59,7 @@
  # the dist directory created by py2exe.   # also needed is the GTK's share/themes (as dist/share/themes),   # for dialogs to display in MS-Windows XP theme. - "includes" : includes, + "includes" : includes + list(hgextmods),   "optimize" : 1   }   } @@ -58,7 +71,7 @@
  # Specific definitios for Posix installations   _extra = {}   _scripts = ['hgtk'] - _packages = ['hggtk', 'thgutil'] + _packages = ['hggtk', 'hggtk.logview', 'thgutil', 'thgutil.iniparse']   _data_files = [(os.path.join('share/pixmaps/tortoisehg', root),   [os.path.join(root, file_) for file_ in files])   for root, dirs, files in os.walk('icons')]