enable parallel make

This commit is contained in:
Yuta
2011-04-01 01:28:17 +09:00
parent ff2af78672
commit bb24bd5fb4
2 changed files with 11 additions and 2 deletions
+7
View File
@@ -36,6 +36,13 @@ class InstallCommand(Command):
default=None,
help="Install a python under an alias."
)
self.parser.add_option(
'-j', "--jobs",
dest="jobs",
type='int',
default=0,
help="Enable parallel make."
)
def run_command(self, options, args):
if args:
+4 -2
View File
@@ -249,11 +249,13 @@ class PythonInstaller(object):
s.check_call("./configure --prefix=%s %s %s" % (self.install_dir, self.options.configure, configure_option))
def make(self):
jobs = self.options.jobs
make = ((jobs > 0 and 'make -j%s' % jobs) or 'make')
s = Subprocess(log=self.logfile, cwd=self.build_dir)
if self.options.force:
s.check_call("make")
s.check_call(make)
else:
s.check_call("make")
s.check_call(make)
s.check_call("make test")
def make_install(self):