~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Martin von Gagern
  • Date: 2011-06-01 12:53:56 UTC
  • mto: This revision was merged to the branch mainline in revision 6009.
  • Revision ID: martin.vgagern@gmx.net-20110601125356-lwozv2vecea6hxfz
Change from no_decorate to classify as name for the argument.

The command line switch remains as --no-classify, to keep backwards
compatibility.  Users are free to include --no-classify in an alias, and
still use --classify to change back.

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