diff --git a/setup/install.py b/setup/install.py index b1698d88ed..d1bb2058f1 100644 --- a/setup/install.py +++ b/setup/install.py @@ -56,7 +56,7 @@ class Develop(Command): short_description = 'Setup a development environment for calibre' MODE = 0o755 - sub_commands = ['build', 'resources', 'iso639', 'gui',] + sub_commands = ['build', 'resources', 'gui',] def add_postinstall_options(self, parser): parser.add_option('--make-errors-fatal', action='store_true', default=False, diff --git a/setup/translations.py b/setup/translations.py index 17c8d10018..e8b0fecdf1 100644 --- a/setup/translations.py +++ b/setup/translations.py @@ -21,7 +21,12 @@ def qt_sources(): class POT(Command): # {{{ description = 'Update the .pot translation template and upload it' - LP_BASE = os.path.join(os.path.dirname(os.path.dirname(Command.SRC)), 'calibre-translations') + LP_BASE = os.path.join(os.path.dirname(Command.SRC)) + if not os.path.exists(os.path.join(LP_BASE, 'setup', 'iso_639')): + # We are in a git checkout, translations are assumed to be in a + # directory called calibre-translations at the same level as the + # calibre directory. + LP_BASE = os.path.join(os.path.dirname(os.path.dirname(Command.SRC)), 'calibre-translations') LP_SRC = os.path.join(LP_BASE, 'src') LP_PATH = os.path.join(LP_SRC, os.path.join(__appname__, 'translations')) LP_ISO_PATH = os.path.join(LP_BASE, 'setup', 'iso_639')