setup.py
changeset 3893 070628929e1f
parent 3892 d6cc510dfe5e
child 4519 5a9e767c2908
equal deleted inserted replaced
3892:d6cc510dfe5e 3893:070628929e1f
    15 
    15 
    16 import mercurial.version
    16 import mercurial.version
    17 import mercurial.demandimport
    17 import mercurial.demandimport
    18 mercurial.demandimport.enable = lambda: None
    18 mercurial.demandimport.enable = lambda: None
    19 
    19 
       
    20 extra = {}
       
    21 
    20 # py2exe needs to be installed to work
    22 # py2exe needs to be installed to work
    21 try:
    23 try:
    22     import py2exe
    24     import py2exe
    23 
    25 
    24     # Help py2exe to find win32com.shell
    26     # Help py2exe to find win32com.shell
    32         m = sys.modules[pn]
    34         m = sys.modules[pn]
    33         for p in m.__path__[1:]:
    35         for p in m.__path__[1:]:
    34             modulefinder.AddPackagePath(pn, p)
    36             modulefinder.AddPackagePath(pn, p)
    35     except ImportError:
    37     except ImportError:
    36         pass
    38         pass
       
    39 
       
    40     extra['console'] = ['hg']
    37 
    41 
    38 except ImportError:
    42 except ImportError:
    39     pass
    43     pass
    40 
    44 
    41 # specify version string, otherwise 'hg identify' will be used:
    45 # specify version string, otherwise 'hg identify' will be used:
    68       scripts=['hg', 'hgmerge'],
    72       scripts=['hg', 'hgmerge'],
    69       options=dict(bdist_mpkg=dict(zipdist=True,
    73       options=dict(bdist_mpkg=dict(zipdist=True,
    70                                    license='COPYING',
    74                                    license='COPYING',
    71                                    readme='contrib/macosx/Readme.html',
    75                                    readme='contrib/macosx/Readme.html',
    72                                    welcome='contrib/macosx/Welcome.html')),
    76                                    welcome='contrib/macosx/Welcome.html')),
    73       console=['hg'])
    77       **extra)