~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Vincent Ladeuil
  • Date: 2011-06-15 11:36:05 UTC
  • mto: This revision was merged to the branch mainline in revision 5975.
  • Revision ID: v.ladeuil+lp@free.fr-20110615113605-p7zyyfry9wy1hquc
Make ContentConflict resolution more robust

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,
202
198
    from distutils.command.build_ext import build_ext
203
199
else:
204
200
    have_pyrex = True
205
 
    pyrex_version_info = tuple(map(int, pyrex_version.rstrip("+").split('.')))
 
201
    pyrex_version_info = tuple(map(int, pyrex_version.split('.')))
206
202
 
207
203
 
208
204
class build_ext_if_possible(build_ext):
482
478
    packages.append('sqlite3')
483
479
 
484
480
 
485
 
def get_fastimport_py2exe_info(includes, excludes, packages):
486
 
    # This is the python-fastimport package, not to be confused with the
487
 
    # bzr-fastimport plugin.
488
 
    packages.append('fastimport')
489
 
 
490
 
 
491
481
if 'bdist_wininst' in sys.argv:
492
482
    def find_docs():
493
483
        docs = []
517
507
 
518
508
    ARGS.update(META_INFO)
519
509
    ARGS.update(BZRLIB)
520
 
    PKG_DATA['package_data']['bzrlib'].append('locale/*/LC_MESSAGES/*.mo')
521
510
    ARGS.update(PKG_DATA)
522
511
 
523
512
    setup(**ARGS)
524
513
 
525
514
elif 'py2exe' in sys.argv:
 
515
    import glob
526
516
    # py2exe setup
527
517
    import py2exe
528
518
 
672
662
                       'tools/win32/bzr_postinstall.py',
673
663
                       ]
674
664
    gui_targets = [gui_target]
675
 
    data_files = topics_files + plugins_files + I18N_FILES
 
665
    data_files = topics_files + plugins_files
676
666
 
677
667
    if 'qbzr' in plugins:
678
668
        get_qbzr_py2exe_info(includes, excludes, packages, data_files)
680
670
    if 'svn' in plugins:
681
671
        get_svn_py2exe_info(includes, excludes, packages)
682
672
 
683
 
    if 'fastimport' in plugins:
684
 
        get_fastimport_py2exe_info(includes, excludes, packages)
685
 
 
686
673
    if "TBZR" in os.environ:
687
674
        # TORTOISE_OVERLAYS_MSI_WIN32 must be set to the location of the
688
675
        # TortoiseOverlays MSI installer file. It is in the TSVN svn repo and
756
743
        # easy_install one
757
744
        DATA_FILES = [('man/man1', ['bzr.1'])]
758
745
 
759
 
    DATA_FILES = DATA_FILES + I18N_FILES
760
746
    # std setup
761
747
    ARGS = {'scripts': ['bzr'],
762
748
            'data_files': DATA_FILES,