/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/bzr_distutils.py

  • Committer: Richard Wilbur
  • Date: 2016-02-04 19:07:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6618.
  • Revision ID: richard.wilbur@gmail.com-20160204190728-p0zvfii6zase0fw7
Update COPYING.txt from the original http://www.gnu.org/licenses/gpl-2.0.txt  (Only differences were in whitespace.)  Thanks to Petr Stodulka for pointing out the discrepancy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*- coding: utf-8 -*-
2
2
#
3
 
# Copyright (C) 2007, 2009, 2011 Canonical Ltd.
 
3
# Copyright (C) 2007,2009,2011 Canonical Ltd.
4
4
#
5
5
# This program is free software; you can redistribute it and/or modify
6
6
# it under the terms of the GNU General Public License as published by
20
20
 
21
21
"""build_mo command for setup.py"""
22
22
 
 
23
from __future__ import absolute_import
 
24
 
23
25
from distutils import log
24
26
from distutils.core import Command
25
27
from distutils.dep_util import newer
43
45
                    ('force', 'f', 'Force creation of mo files'),
44
46
                    ('lang=', None, 'Comma-separated list of languages '
45
47
                                    'to process'),
46
 
                    ]
 
48
                   ]
47
49
 
48
50
    boolean_options = ['force']
49
51
 
58
60
        self.set_undefined_options('build', ('force', 'force'))
59
61
        self.prj_name = self.distribution.get_name()
60
62
        if self.build_dir is None:
61
 
            self.build_dir = 'breezy/locale'
 
63
            self.build_dir = 'bzrlib/locale'
62
64
        if not self.output_base:
63
65
            self.output_base = self.prj_name or 'messages'
64
66
        if self.source_dir is None:
92
94
                pot = (self.prj_name or 'messages') + '.pot'
93
95
                en_po = 'en.po'
94
96
                self.spawn(['msginit',
95
 
                            '--no-translator',
96
 
                            '-l', 'en',
97
 
                            '-i', os.path.join(self.source_dir, pot),
98
 
                            '-o', os.path.join(self.source_dir, en_po),
99
 
                            ])
 
97
                    '--no-translator',
 
98
                    '-l', 'en',
 
99
                    '-i', os.path.join(self.source_dir, pot),
 
100
                    '-o', os.path.join(self.source_dir, en_po),
 
101
                    ])
100
102
 
101
103
        basename = self.output_base
102
104
        if not basename.endswith('.mo'):
112
114
            if self.force or newer(po, mo):
113
115
                log.info('Compile: %s -> %s' % (po, mo))
114
116
                self.spawn(['msgfmt', '-o', mo, po])
 
117
 
 
118