Code

Installation: Fixed an issue that prevented to use EasyInstall
authorber <ber@57a73879-2fb5-44c3-a270-3262357dd7e2>
Fri, 8 Jul 2011 15:28:00 +0000 (15:28 +0000)
committerber <ber@57a73879-2fb5-44c3-a270-3262357dd7e2>
Fri, 8 Jul 2011 15:28:00 +0000 (15:28 +0000)
  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
roundup/dist/command/build.py
roundup/dist/command/install_lib.py [new file with mode: 0644]
setup.py

index e8309ddbfb18fd6fbf341c7feaffc5302b994c75..7ec268ecbf755fb3631d5ad6a410bdccf71ce15c 100644 (file)
@@ -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)
index 0fca2cec65cfe814cb28c5ab5c607163cb285cae..4d2a1f57d2eba93a6c7a90ce493c4462f86de3de 100644 (file)
@@ -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 (file)
index 0000000..df28a28
--- /dev/null
@@ -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 1d41f79602f4fd34d0890e4ec5be55cd1420f319..8fe03db6e38a8a163c7d92e1d990ecf15e61d512 100644 (file)
--- 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,