~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Alexander Belchenko
  • Date: 2008-01-20 21:51:38 UTC
  • mto: This revision was merged to the branch mainline in revision 3231.
  • Revision ID: bialix@ukr.net-20080120215138-9whefgyqt8rfdcbb
bzr.exe: move builtin plugins (launchpad, multiparent) out of library.zip to plugins directory

Show diffs side-by-side

added added

removed removed

Lines of Context:
264
264
    setup(**ARGS)
265
265
 
266
266
elif 'py2exe' in sys.argv:
 
267
    import glob
267
268
    # py2exe setup
268
269
    import py2exe
269
270
 
291
292
                                     comments = META_INFO['description'],
292
293
                                    )
293
294
 
 
295
    packages = BZRLIB['packages']
 
296
    packages.remove('bzrlib')
 
297
    packages = [i for i in packages if not i.startswith('bzrlib.plugins')]
 
298
    includes = []
 
299
    for i in glob.glob('bzrlib\\*.py'):
 
300
        module = i[:-3].replace('\\', '.')
 
301
        if module == 'bzrlib.__init__':
 
302
            module = 'bzrlib'
 
303
        includes.append(module)
 
304
 
294
305
    additional_packages =  []
295
306
    if sys.version.startswith('2.4'):
296
307
        # adding elementtree package
306
317
    additional_packages.append('email')
307
318
 
308
319
    # text files for help topis
309
 
    import glob
310
320
    text_topics = glob.glob('bzrlib/help_topics/en/*.txt')
311
 
 
312
 
    options_list = {"py2exe": {"packages": BZRLIB['packages'] +
313
 
                                           additional_packages,
 
321
    topics_files = [('lib/help_topics/en', text_topics)]
 
322
 
 
323
    # built-in plugins
 
324
    plugins_files = []
 
325
    for root, dirs, files in os.walk('bzrlib/plugins'):
 
326
        x = []
 
327
        for i in files:
 
328
            if not i.endswith('.py'):
 
329
                continue
 
330
            if i == '__init__.py' and root == 'bzrlib/plugins':
 
331
                continue
 
332
            x.append(os.path.join(root, i))
 
333
        if x:
 
334
            target_dir = root[len('bzrlib/'):]
 
335
            plugins_files.append((target_dir, x))
 
336
 
 
337
    options_list = {"py2exe": {"packages": packages + additional_packages,
 
338
                               "includes": includes,
314
339
                               "excludes": ["Tkinter", "medusa", "tools"],
315
340
                               "dist_dir": "win32_bzr.exe",
316
341
                              },
320
345
                   'tools/win32/bzr_postinstall.py',
321
346
                  ],
322
347
          zipfile='lib/library.zip',
323
 
          data_files=[('lib/help_topics/en', text_topics)],
 
348
          data_files=topics_files+plugins_files,
324
349
          )
325
350
 
326
351
else: