--- utils/command/install_mo.py 2007/03/25 18:18:36 1.1 +++ utils/command/install_mo.py 2007/03/25 18:18:41 @@ -10,7 +10,7 @@ where install_locales should default to: """ from distutils.core import Command -#from distutils.util import change_root +from distutils.util import change_root import os.path @@ -21,12 +21,14 @@ class install_mo(Command): user_options = [('install-dir=', None, 'Directory to install locales into (default: /share/locale//LC_MESSAGES'), ('all-linguas', None, ''), + ('root', None, ''), ] def initialize_options(self): self.install_dir = None self.build_dir = None self.all_linguas = None + self.root = None def finalize_options(self): self.set_undefined_options('build_mo', @@ -35,6 +37,11 @@ class install_mo(Command): self.set_undefined_options('install', ('install_base', 'install_dir')) self.install_dir = os.path.join(self.install_dir, 'share', 'locale') + if self.root is None: + self.set_undefined_options('install', + ('root', 'root')) + if self.root is not None: + self.install_dir = change_root(self.root, self.install_dir) self.name = self.distribution.get_name() self.all_linguas = self.all_linguas.split(',')