comparison setup.py @ 1307:3b717f27ffea

Merge with BOS
author mpm@selenic.com
date Thu, 22 Sep 2005 09:39:05 -0700
parents 0e921c164b58
children a7631cf1326a
comparison
equal deleted inserted replaced
1286:4f08da74cae8 1307:3b717f27ffea
11 11
12 import mercurial.version 12 import mercurial.version
13 13
14 # py2exe needs to be installed to work 14 # py2exe needs to be installed to work
15 try: 15 try:
16 import py2exe 16 import py2exe
17 17
18 # Due to the use of demandload py2exe is not finding the modules. 18 # Due to the use of demandload py2exe is not finding the modules.
19 # packagescan.getmodules creates a list of modules included in 19 # packagescan.getmodules creates a list of modules included in
20 # the mercurial package plus depdent modules. 20 # the mercurial package plus depdent modules.
21 import mercurial.packagescan 21 import mercurial.packagescan
22 from py2exe.build_exe import py2exe as build_exe 22 from py2exe.build_exe import py2exe as build_exe
23 23
24 class py2exe_for_demandload(build_exe): 24 class py2exe_for_demandload(build_exe):
25 """ overwrites the py2exe command class for getting the build 25 """ overwrites the py2exe command class for getting the build
26 directory and for setting the 'includes' option.""" 26 directory and for setting the 'includes' option."""
27 def initialize_options(self): 27 def initialize_options(self):
32 self.set_undefined_options('build', 32 self.set_undefined_options('build',
33 ('build_lib', 'build_lib')) 33 ('build_lib', 'build_lib'))
34 # Sets the 'includes' option with the list of needed modules 34 # Sets the 'includes' option with the list of needed modules
35 if not self.includes: 35 if not self.includes:
36 self.includes = [] 36 self.includes = []
37 self.includes += mercurial.packagescan.getmodules(self.build_lib,'mercurial') 37 self.includes += mercurial.packagescan.getmodules(self.build_lib,
38 'mercurial')
39 self.includes += mercurial.packagescan.getmodules(self.build_lib,
40 'hgext')
38 build_exe.finalize_options(self) 41 build_exe.finalize_options(self)
39 except ImportError: 42 except ImportError:
40 py2exe_for_demandload = None 43 py2exe_for_demandload = None
41 44
42 45
59 author='Matt Mackall', 62 author='Matt Mackall',
60 author_email='mpm@selenic.com', 63 author_email='mpm@selenic.com',
61 url='http://selenic.com/mercurial', 64 url='http://selenic.com/mercurial',
62 description='scalable distributed SCM', 65 description='scalable distributed SCM',
63 license='GNU GPL', 66 license='GNU GPL',
64 packages=['mercurial'], 67 packages=['mercurial', 'hgext'],
65 ext_modules=[Extension('mercurial.mpatch', ['mercurial/mpatch.c']), 68 ext_modules=[Extension('mercurial.mpatch', ['mercurial/mpatch.c']),
66 Extension('mercurial.bdiff', ['mercurial/bdiff.c'])], 69 Extension('mercurial.bdiff', ['mercurial/bdiff.c'])],
67 data_files=[('mercurial/templates', 70 data_files=[('mercurial/templates',
68 ['templates/map'] + 71 ['templates/map'] +
69 glob.glob('templates/map-*') + 72 glob.glob('templates/map-*') +