~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Alexander Belchenko
  • Date: 2012-03-29 08:34:13 UTC
  • mto: (6015.44.14 2.4)
  • mto: This revision was merged to the branch mainline in revision 6513.
  • Revision ID: bialix@ukr.net-20120329083413-d4bqqdtfn2yrxp4f
change st_dev, st_ino, st_uid, st_gid from int members to properties.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
import os.path
11
11
import sys
12
12
import copy
13
 
import glob
14
13
 
15
14
if sys.version_info < (2, 6):
16
15
    sys.stderr.write("[ERROR] Not a supported Python version. Need 2.6+\n")
71
70
                                        'tests/ssl_certs/server_without_pass.key',
72
71
                                        'tests/ssl_certs/server_with_pass.key',
73
72
                                        'tests/ssl_certs/server.crt',
 
73
                                        'locale/*/LC_MESSAGES/*.mo',
74
74
                                       ]},
75
75
           }
76
 
I18N_FILES = []
77
 
for filepath in glob.glob("bzrlib/locale/*/LC_MESSAGES/*.mo"):
78
 
    langfile = filepath[len("bzrlib/locale/"):]
79
 
    targetpath = os.path.dirname(os.path.join("share/locale", langfile))
80
 
    I18N_FILES.append((targetpath, [filepath]))
 
76
 
81
77
 
82
78
def get_bzrlib_packages():
83
79
    """Recurse through the bzrlib directory, and extract the package names"""
172
168
## Setup
173
169
########################
174
170
 
175
 
from bzrlib.bzr_distutils import build_mo
 
171
from tools.build_mo import build_mo
176
172
 
177
173
command_classes = {'install_scripts': my_install_scripts,
178
174
                   'build': bzr_build,
431
427
    # PyQt4 itself still escapes the plugin detection code for some reason...
432
428
    includes.append('PyQt4.QtCore')
433
429
    includes.append('PyQt4.QtGui')
434
 
    includes.append('PyQt4.QtTest')
435
430
    includes.append('sip') # extension module required for Qt.
436
431
    packages.append('pygments') # colorizer for qbzr
437
432
    packages.append('docutils') # html formatting
483
478
    packages.append('sqlite3')
484
479
 
485
480
 
486
 
def get_git_py2exe_info(includes, excludes, packages):
487
 
    packages.append('dulwich')
488
 
 
489
 
 
490
481
def get_fastimport_py2exe_info(includes, excludes, packages):
491
482
    # This is the python-fastimport package, not to be confused with the
492
483
    # bzr-fastimport plugin.
522
513
 
523
514
    ARGS.update(META_INFO)
524
515
    ARGS.update(BZRLIB)
525
 
    PKG_DATA['package_data']['bzrlib'].append('locale/*/LC_MESSAGES/*.mo')
526
516
    ARGS.update(PKG_DATA)
527
517
 
528
518
    setup(**ARGS)
529
519
 
530
520
elif 'py2exe' in sys.argv:
 
521
    import glob
531
522
    # py2exe setup
532
523
    import py2exe
533
524
 
677
668
                       'tools/win32/bzr_postinstall.py',
678
669
                       ]
679
670
    gui_targets = [gui_target]
680
 
    data_files = topics_files + plugins_files + I18N_FILES
 
671
    data_files = topics_files + plugins_files
681
672
 
682
673
    if 'qbzr' in plugins:
683
674
        get_qbzr_py2exe_info(includes, excludes, packages, data_files)
685
676
    if 'svn' in plugins:
686
677
        get_svn_py2exe_info(includes, excludes, packages)
687
678
 
688
 
    if 'git' in plugins:
689
 
        get_git_py2exe_info(includes, excludes, packages)
690
 
 
691
679
    if 'fastimport' in plugins:
692
680
        get_fastimport_py2exe_info(includes, excludes, packages)
693
681
 
764
752
        # easy_install one
765
753
        DATA_FILES = [('man/man1', ['bzr.1'])]
766
754
 
767
 
    DATA_FILES = DATA_FILES + I18N_FILES
768
755
    # std setup
769
756
    ARGS = {'scripts': ['bzr'],
770
757
            'data_files': DATA_FILES,