summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Resch <andrewresch@gmail.com>2008-11-29 01:22:29 +0000
committerAndrew Resch <andrewresch@gmail.com>2008-11-29 01:22:29 +0000
commitfb0d46fefef9adb5f2ec64dcd1892218bc713bcd (patch)
treeb9527b5470c5184a06d36dce744871a792df3e2c
parent964c5fbc4f27ed88615a57b7fb5e9dabf1af629e (diff)
downloaddeluge-fb0d46fefef9adb5f2ec64dcd1892218bc713bcd.tar.gz
deluge-fb0d46fefef9adb5f2ec64dcd1892218bc713bcd.tar.bz2
deluge-fb0d46fefef9adb5f2ec64dcd1892218bc713bcd.zip
Build translations in the build folder
-rw-r--r--setup.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index ffdad80a3..b4cdc12d4 100644
--- a/setup.py
+++ b/setup.py
@@ -189,11 +189,15 @@ if windows_check() or not os.path.exists(os.path.join(sysconfig.get_config_var("
class build_trans(cmd.Command):
description = 'Compile .po files into .mo files'
+ user_options = [
+ ('build-lib', None, "lib build folder")
+ ]
+
def initialize_options(self):
- pass
+ self.build_lib = None
def finalize_options(self):
- pass
+ self.set_undefined_options('build', ('build_lib', 'build_lib'))
def run(self):
po_dir = os.path.join(os.path.dirname(__file__), 'deluge/i18n/')
@@ -202,7 +206,7 @@ class build_trans(cmd.Command):
if f.endswith('.po'):
lang = f[:len(f) - 3]
src = os.path.join(path, f)
- dest_path = os.path.join('deluge', 'i18n', lang, \
+ dest_path = os.path.join(self.build_lib, 'deluge', 'i18n', lang, \
'LC_MESSAGES')
dest = os.path.join(dest_path, 'deluge.mo')
if not os.path.exists(dest_path):