PR #11524 introduced an error that breaks packages depending on bazel directly.
Steps to reproduce the issue
Pick a random package, e.g. htop, and have it depend on bazel:
git apply <<EOF
diff --git a/var/spack/repos/builtin/packages/htop/package.py b/var/spack/repos/builtin/packages/htop/package.py
index 63f33c466..d76748394 100644
--- a/var/spack/repos/builtin/packages/htop/package.py
+++ b/var/spack/repos/builtin/packages/htop/package.py
@@ -18,6 +18,7 @@ class Htop(AutotoolsPackage):
version('2.0.2', '7d354d904bad591a931ad57e99fea84a')
depends_on('ncurses')
+ depends_on('bazel')
def configure_args(self):
return ['--enable-shared']
EOF
$ spack install --fake htop
Error Message
==> Error: AttributeError: module 'spack.pkg.builtin.htop' has no attribute 'make_jobs'
spack/var/spack/repos/builtin/packages/bazel/package.py:98, in setup_dependent_package:
95 dependent_module = inspect.getmodule(dependent_spec.package)
96 if not dependent_spec.package.parallel:
97 jobs = 1
>> 98 elif dependent_module.make_jobs:
99 jobs = dependent_module.make_jobs
100 module.bazel = BazelExecutable('bazel', 'build', jobs)
Workaround
A possible workaround is to just add parallel = False to the package.
PR #11524 introduced an error that breaks packages depending on bazel directly.
Steps to reproduce the issue
Pick a random package, e.g.
htop, and have it depend on bazel:Error Message
Workaround
A possible workaround is to just add
parallel = Falseto the package.