Dont launch separate interpreters for each sub-command during bootstrap

This commit is contained in:
Kovid Goyal 2015-07-15 13:47:11 +05:30
parent 9ef37427d3
commit a3481c034a

View File

@ -320,15 +320,15 @@ class Bootstrap(Command):
description = 'Bootstrap a fresh checkout of calibre from git to a state where it can be installed. Requires various development tools/libraries/headers'
TRANSLATIONS_REPO = 'https://github.com/kovidgoyal/calibre-translations.git'
sub_commands = 'build iso639 iso3166 translations gui resources'.split()
def run(self, opts):
def pre_sub_commands(self, opts):
tdir = self.j(self.d(self.SRC), 'translations')
if os.path.exists(tdir):
subprocess.check_call(['git', 'pull'], cwd=tdir)
else:
subprocess.check_call(['git', 'clone', self.TRANSLATIONS_REPO, 'translations'], cwd=self.d(self.SRC))
for cmd in 'build iso639 iso3166 translations gui resources'.split():
self.info('Running %s setup.py %s' % (sys.executable, cmd))
subprocess.check_call([sys.executable, 'setup.py', cmd], cwd=self.d(self.SRC))
def run(self, opts):
self.info('\n\nAll done! You should now be able to run "%s setup.py install" to install calibre' % sys.executable)