~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

(jelmer) Fix bug #1010339,
 use encoding_type='exact' for bzr testament (John A Meinel)

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,
482
478
    packages.append('sqlite3')
483
479
 
484
480
 
485
 
def get_git_py2exe_info(includes, excludes, packages):
486
 
    packages.append('dulwich')
487
 
 
488
 
 
489
481
def get_fastimport_py2exe_info(includes, excludes, packages):
490
482
    # This is the python-fastimport package, not to be confused with the
491
483
    # bzr-fastimport plugin.
521
513
 
522
514
    ARGS.update(META_INFO)
523
515
    ARGS.update(BZRLIB)
524
 
    PKG_DATA['package_data']['bzrlib'].append('locale/*/LC_MESSAGES/*.mo')
525
516
    ARGS.update(PKG_DATA)
526
517
 
527
518
    setup(**ARGS)
528
519
 
529
520
elif 'py2exe' in sys.argv:
 
521
    import glob
530
522
    # py2exe setup
531
523
    import py2exe
532
524
 
676
668
                       'tools/win32/bzr_postinstall.py',
677
669
                       ]
678
670
    gui_targets = [gui_target]
679
 
    data_files = topics_files + plugins_files + I18N_FILES
 
671
    data_files = topics_files + plugins_files
680
672
 
681
673
    if 'qbzr' in plugins:
682
674
        get_qbzr_py2exe_info(includes, excludes, packages, data_files)
684
676
    if 'svn' in plugins:
685
677
        get_svn_py2exe_info(includes, excludes, packages)
686
678
 
687
 
    if 'git' in plugins:
688
 
        get_git_py2exe_info(includes, excludes, packages)
689
 
 
690
679
    if 'fastimport' in plugins:
691
680
        get_fastimport_py2exe_info(includes, excludes, packages)
692
681
 
763
752
        # easy_install one
764
753
        DATA_FILES = [('man/man1', ['bzr.1'])]
765
754
 
766
 
    DATA_FILES = DATA_FILES + I18N_FILES
767
755
    # std setup
768
756
    ARGS = {'scripts': ['bzr'],
769
757
            'data_files': DATA_FILES,