mirror of
https://github.com/kennethreitz-archive/python-build.git
synced 2026-06-05 23:30:18 +00:00
enable parallel make
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user