From e4f317dbe578ff13a0867833211b170a44721ac4 Mon Sep 17 00:00:00 2001 From: ber Date: Fri, 8 Jul 2011 15:28:00 +0000 Subject: [PATCH] Installation: Fixed an issue that prevented to use EasyInstall and a Python egg. Thanks to Satchidanand Haridas for the patch and John Kristensen for testing it. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4628 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 3 +++ roundup/dist/command/build.py | 18 +++++++++--------- roundup/dist/command/install_lib.py | 9 +++++++++ setup.py | 2 ++ 4 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 roundup/dist/command/install_lib.py diff --git a/CHANGES.txt b/CHANGES.txt index e8309dd..7ec268e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,6 +15,9 @@ Features: Fixed: +- Installation: Fixed an issue that prevented to use EasyInstall + and a Python egg. Thanks to Satchidanand Haridas for the patch and + John Kristensen for testing it. (Bernhard Reiter) - The PostgreSQL backend quotes database names now for CREATE and DROP, enabling more exotic tracker names. Closes issue2550497. Thanks to Sebastian Harl for providing the patch. (Bernhard Reiter) diff --git a/roundup/dist/command/build.py b/roundup/dist/command/build.py index 0fca2ce..4d2a1f5 100644 --- a/roundup/dist/command/build.py +++ b/roundup/dist/command/build.py @@ -42,19 +42,19 @@ def check_manifest(): 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) +class build(base): def run(self): check_manifest() - self.build_message_files() + build_message_files(self) base.run(self) diff --git a/roundup/dist/command/install_lib.py b/roundup/dist/command/install_lib.py new file mode 100644 index 0000000..df28a28 --- /dev/null +++ b/roundup/dist/command/install_lib.py @@ -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) diff --git a/setup.py b/setup.py index 1d41f79..8fe03db 100644 --- a/setup.py +++ b/setup.py @@ -23,6 +23,7 @@ from roundup.dist.command.build_scripts import build_scripts 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 @@ -140,6 +141,7 @@ def main(): 'build_py': build_py, 'build': build, 'bdist_rpm': bdist_rpm, + 'install_lib': install_lib, }, packages=packages, py_modules=py_modules, -- 2.30.2