Show More
@@ -37,7 +37,6 b' from distutils.command.build_py import b' | |||||
37 | from distutils.spawn import spawn, find_executable |
|
37 | from distutils.spawn import spawn, find_executable | |
38 | from distutils.ccompiler import new_compiler |
|
38 | from distutils.ccompiler import new_compiler | |
39 |
|
39 | |||
40 | extra = {} |
|
|||
41 | scripts = ['hg'] |
|
40 | scripts = ['hg'] | |
42 | if os.name == 'nt': |
|
41 | if os.name == 'nt': | |
43 | scripts.append('contrib/win32/hg.bat') |
|
42 | scripts.append('contrib/win32/hg.bat') | |
@@ -77,6 +76,7 b' def hasfunction(cc, funcname):' | |||||
77 | # py2exe needs to be installed to work |
|
76 | # py2exe needs to be installed to work | |
78 | try: |
|
77 | try: | |
79 | import py2exe |
|
78 | import py2exe | |
|
79 | py2exeloaded = True | |||
80 |
|
80 | |||
81 | # Help py2exe to find win32com.shell |
|
81 | # Help py2exe to find win32com.shell | |
82 | try: |
|
82 | try: | |
@@ -92,9 +92,8 b' try:' | |||||
92 | except ImportError: |
|
92 | except ImportError: | |
93 | pass |
|
93 | pass | |
94 |
|
94 | |||
95 | extra['console'] = ['hg'] |
|
|||
96 |
|
||||
97 | except ImportError: |
|
95 | except ImportError: | |
|
96 | py2exeloaded = False | |||
98 | pass |
|
97 | pass | |
99 |
|
98 | |||
100 | def runcmd(cmd, env): |
|
99 | def runcmd(cmd, env): | |
@@ -266,9 +265,22 b" for root in ('templates',):" | |||||
266 | packagedata['mercurial'].append(f) |
|
265 | packagedata['mercurial'].append(f) | |
267 |
|
266 | |||
268 | datafiles = [] |
|
267 | datafiles = [] | |
|
268 | setupversion = version | |||
|
269 | extra = {} | |||
|
270 | ||||
|
271 | if py2exeloaded: | |||
|
272 | extra['console'] = [ | |||
|
273 | {'script':'hg', | |||
|
274 | 'copyright':'Copyright (C) 2005-2010 Matt Mackall and others', | |||
|
275 | 'product_version':version}] | |||
|
276 | ||||
|
277 | if os.name == 'nt': | |||
|
278 | # Windows binary file versions for exe/dll files must have the | |||
|
279 | # form W.X.Y.Z, where W,X,Y,Z are numbers in the range 0..65535 | |||
|
280 | setupversion = version.split('+', 1)[0] | |||
269 |
|
281 | |||
270 | setup(name='mercurial', |
|
282 | setup(name='mercurial', | |
271 | version=version, |
|
283 | version=setupversion, | |
272 | author='Matt Mackall', |
|
284 | author='Matt Mackall', | |
273 | author_email='mpm@selenic.com', |
|
285 | author_email='mpm@selenic.com', | |
274 | url='http://mercurial.selenic.com/', |
|
286 | url='http://mercurial.selenic.com/', |
General Comments 0
You need to be logged in to leave comments.
Login now