comparison setup.py @ 15493:8504699d1aa6

setup: hgbuildmo inherits from Command hgbuildmo does not need anything provided by the build class.
author Simon Heimberg <simohe@besonet.ch>
date Tue, 01 Nov 2011 20:13:53 +0100
parents 36f076d03b34
children 7a7a1c594daf
comparison
equal deleted inserted replaced
15492:36f076d03b34 15493:8504699d1aa6
190 # Insert hgbuildmo first so that files in mercurial/locale/ are found 190 # Insert hgbuildmo first so that files in mercurial/locale/ are found
191 # when build_py is run next. 191 # when build_py is run next.
192 sub_commands = [('build_mo', None), 192 sub_commands = [('build_mo', None),
193 ] + build.sub_commands 193 ] + build.sub_commands
194 194
195 class hgbuildmo(build): 195 class hgbuildmo(Command):
196 196
197 description = "build translations (.mo files)" 197 description = "build translations (.mo files)"
198 198
199 def run(self): 199 def run(self):
200 if not find_executable('msgfmt'): 200 if not find_executable('msgfmt'):
219 if sys.platform != 'sunos5': 219 if sys.platform != 'sunos5':
220 # msgfmt on Solaris does not know about -c 220 # msgfmt on Solaris does not know about -c
221 cmd.append('-c') 221 cmd.append('-c')
222 self.mkpath(join('mercurial', modir)) 222 self.mkpath(join('mercurial', modir))
223 self.make_file([pofile], mobuildfile, spawn, (cmd,)) 223 self.make_file([pofile], mobuildfile, spawn, (cmd,))
224
225 def initialize_options(self):
226 pass
227
228 def finalize_options(self):
229 pass
224 230
225 231
226 class hgdist(Distribution): 232 class hgdist(Distribution):
227 pure = 0 233 pure = 0
228 234