--- a/setup.py Tue Nov 01 20:13:52 2011 +0100
+++ b/setup.py Tue Nov 01 20:13:53 2011 +0100
@@ -186,6 +186,12 @@
except ImportError:
version = 'unknown'
+class hgbuild(build):
+ # Insert hgbuildmo first so that files in mercurial/locale/ are found
+ # when build_py is run next.
+ sub_commands = [('build_mo', None),
+ ] + build.sub_commands
+
class hgbuildmo(build):
description = "build translations (.mo files)"
@@ -217,10 +223,6 @@
self.make_file([pofile], mobuildfile, spawn, (cmd,))
-# Insert hgbuildmo first so that files in mercurial/locale/ are found
-# when build_py is run next.
-build.sub_commands.insert(0, ('build_mo', None))
-
class hgdist(Distribution):
pure = 0
@@ -344,7 +346,8 @@
fp.write(data)
fp.close()
-cmdclass = {'build_mo': hgbuildmo,
+cmdclass = {'build': hgbuild,
+ 'build_mo': hgbuildmo,
'build_ext': hgbuildext,
'build_py': hgbuildpy,
'build_hgextindex': buildhgextindex,