Allow running python setup.py develop froma git checkout

This commit is contained in:
Kovid Goyal 2013-07-03 21:58:44 +05:30
parent a3adb69d94
commit 509cc82d80
2 changed files with 7 additions and 2 deletions

View File

@ -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,

View File

@ -21,6 +21,11 @@ def qt_sources():
class POT(Command): # {{{
description = 'Update the .pot translation template and upload it'
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'))