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

setup.py: fixes, additions and changes

Changeset 2addb6a5e3dc

Parent ebbb8f8bbb7d

by Sune Foldager

Changes to one file · Browse files at 2addb6a5e3dc Showing diff from parent ebbb8f8bbb7d Diff from another changeset...

Change 1 of 3 Show Entire File setup.py Stacked
 
51
52
53
54
 
55
56
57
58
 
 
 
 
 
 
 
 
 
 
 
59
60
61
 
 
 
 
62
63
64
 
68
69
70
71
72
 
 
73
74
75
 
92
93
94
95
 
96
97
98
 
99
100
101
 
51
52
53
 
54
55
56
57
 
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
 
82
83
84
 
 
85
86
87
88
89
 
106
107
108
 
109
110
111
 
112
113
114
115
@@ -51,14 +51,28 @@
  _data_files = [(root, [os.path.join(root, file_) for file_ in files])   for root, dirs, files in os.walk('icons')]   extra['windows'] = [ - {"script":"tracelog.py", + {"script":"contrib/tracelog.py",   "icon_resources": [(1, "icons/tortoise/python.ico")]}   ]   extra['com_server'] = ["tortoisehg"] - extra['console'] = ["contrib/hg", "contrib/hgtk"] + extra['console'] = ["contrib/hg", "hgtk"] + + # 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 + # running in a py2exe environment. It also makes debugging easier. + "skip_archive" : 1, +   # Don't pull in all this MFC stuff used by the makepy UI.   "excludes" : "pywin,pywin.dialogs,pywin.dialogs.list",   @@ -68,8 +82,8 @@
  # 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" : "dbhash,pango,atk,pangocairo,cairo,gobject," + \ - ",".join(hgextmods), + "includes" : includes + list(hgextmods), + "optimize" : 1,   }   }   @@ -92,10 +106,10 @@
   if os.name == "nt":   (scripts, packages, data_files, extra) = setup_windows() - desc='Windows shell extension for Mercurial VCS', + desc='Windows shell extension for Mercurial VCS'  else:   (scripts, packages, data_files, extra) = setup_posix() - desc='TortoiseHg dialogs for Mercurial VCS', + desc='TortoiseHg dialogs for Mercurial VCS'    try:   l = os.popen('hg id -it').read().split()