292
293
comments = META_INFO['description'],
295
additional_packages = []
296
packages = BZRLIB['packages']
297
packages.remove('bzrlib')
298
packages = [i for i in packages if not i.startswith('bzrlib.plugins')]
300
for i in glob.glob('bzrlib\\*.py'):
301
module = i[:-3].replace('\\', '.')
302
if module.endswith('__init__'):
303
module = module[:-len('__init__')]
304
includes.append(module)
306
additional_packages = set()
296
307
if sys.version.startswith('2.4'):
297
308
# adding elementtree package
298
additional_packages.append('elementtree')
309
additional_packages.add('elementtree')
299
310
elif sys.version.startswith('2.5'):
300
additional_packages.append('xml.etree')
311
additional_packages.add('xml.etree')
303
314
warnings.warn('Unknown Python version.\n'
304
315
'Please check setup.py script for compatibility.')
305
316
# email package from std python library use lazy import,
306
317
# so we need to explicitly add all package
307
additional_packages.append('email')
318
additional_packages.add('email')
309
320
# text files for help topis
311
321
text_topics = glob.glob('bzrlib/help_topics/en/*.txt')
313
options_list = {"py2exe": {"packages": BZRLIB['packages'] +
322
topics_files = [('lib/help_topics/en', text_topics)]
326
for root, dirs, files in os.walk('bzrlib/plugins'):
329
if not i.endswith('.py'):
331
if i == '__init__.py' and root == 'bzrlib/plugins':
333
x.append(os.path.join(root, i))
335
target_dir = root[len('bzrlib/'):] # install to 'plugins/...'
336
plugins_files.append((target_dir, x))
337
# find modules for built-in plugins
338
import tools.package_mf
339
mf = tools.package_mf.CustomModuleFinder()
340
mf.run_package('bzrlib/plugins')
341
packs, mods = mf.get_result()
342
additional_packages.update(packs)
344
options_list = {"py2exe": {"packages": packages + list(additional_packages),
345
"includes": includes + mods,
315
346
"excludes": ["Tkinter", "medusa", "tools"],
316
347
"dist_dir": "win32_bzr.exe",