diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin.mock/packages/a/package.py | 2 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/bazel/package.py | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/var/spack/repos/builtin.mock/packages/a/package.py b/var/spack/repos/builtin.mock/packages/a/package.py index 7e5a6f72e6..951e633d78 100644 --- a/var/spack/repos/builtin.mock/packages/a/package.py +++ b/var/spack/repos/builtin.mock/packages/a/package.py @@ -32,6 +32,8 @@ class A(AutotoolsPackage): depends_on('b', when='foobar=bar') + parallel = False + def with_or_without_fee(self, activated): if not activated: return '--no-fee' diff --git a/var/spack/repos/builtin/packages/bazel/package.py b/var/spack/repos/builtin/packages/bazel/package.py index 0c218f6641..51e4e51050 100644 --- a/var/spack/repos/builtin/packages/bazel/package.py +++ b/var/spack/repos/builtin/packages/bazel/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import inspect + from spack import * from multiprocessing import cpu_count from spack.util.environment import env_flag @@ -90,8 +92,9 @@ class Bazel(Package): return super(BazelExecutable, self).__call__(*args, **kwargs) jobs = cpu_count() + dependent_module = inspect.getmodule(dependent_spec.package) if not dependent_spec.package.parallel: jobs = 1 - elif dependent_spec.package.make_jobs: - jobs = dependent_spec.package.make_jobs + elif dependent_module.make_jobs: + jobs = dependent_module.make_jobs module.bazel = BazelExecutable('bazel', 'build', jobs) |