Index: setup.py =================================================================== --- setup.py (revision 4576) +++ setup.py (working copy) @@ -23,6 +23,7 @@ from roundup.dist.command.build_py import build_py from roundup.dist.command.build import build, list_message_files from roundup.dist.command.bdist_rpm import bdist_rpm +from roundup.dist.command.install_lib import install_lib from distutils.core import setup import sys, os @@ -126,6 +127,7 @@ 'build_py': build_py, 'build': build, 'bdist_rpm': bdist_rpm, + 'install_lib': install_lib, }, packages=packages, py_modules=py_modules, Index: roundup/dist/command/install_lib.py =================================================================== --- roundup/dist/command/install_lib.py (revision 0) +++ roundup/dist/command/install_lib.py (revision 0) @@ -0,0 +1,9 @@ +from roundup.dist.command.build import build_message_files, check_manifest +from distutils.command.install_lib import install_lib as base + +class install_lib(base): + + def run(self): + check_manifest() + build_message_files(self) + base.run(self) Index: roundup/dist/command/build.py =================================================================== --- roundup/dist/command/build.py (revision 4576) +++ roundup/dist/command/build.py (working copy) @@ -42,19 +42,19 @@ n-len(err), n) print 'Missing:', '\nMissing: '.join(err) +def build_message_files(command): + """For each locale/*.po, build .mo file in target locale directory""" + for (_src, _dst) in list_message_files(): + _build_dst = os.path.join("build", _dst) + command.mkpath(os.path.dirname(_build_dst)) + command.announce("Compiling %s -> %s" % (_src, _build_dst)) + msgfmt.make(_src, _build_dst) + class build(base): - def build_message_files(self): - """For each locale/*.po, build .mo file in target locale directory""" - for (_src, _dst) in list_message_files(): - _build_dst = os.path.join("build", _dst) - self.mkpath(os.path.dirname(_build_dst)) - self.announce("Compiling %s -> %s" % (_src, _build_dst)) - msgfmt.make(_src, _build_dst) - def run(self): check_manifest() - self.build_message_files() + build_message_files(self) base.run(self)