bazel: python executable required (#28286)
* bazel: python executable required * python: add autodetection of +pythoncmd
This commit is contained in:
parent
6e31094d77
commit
186730a284
@ -110,7 +110,7 @@ class Bazel(Package):
|
|||||||
variant('nodepfail', default=True, description='Disable failing dependency checks due to injected absolute paths - required for most builds using bazel with spack')
|
variant('nodepfail', default=True, description='Disable failing dependency checks due to injected absolute paths - required for most builds using bazel with spack')
|
||||||
|
|
||||||
depends_on('java', type=('build', 'run'))
|
depends_on('java', type=('build', 'run'))
|
||||||
depends_on('python', type=('build', 'run'))
|
depends_on('python+pythoncmd', type=('build', 'run'))
|
||||||
depends_on('zip', when='platform=linux', type=('build', 'run'))
|
depends_on('zip', when='platform=linux', type=('build', 'run'))
|
||||||
|
|
||||||
# make work on power9 (2x commits)
|
# make work on power9 (2x commits)
|
||||||
|
@ -271,6 +271,13 @@ def determine_variants(cls, exes, version_str):
|
|||||||
python = Executable(exes[0])
|
python = Executable(exes[0])
|
||||||
|
|
||||||
variants = ''
|
variants = ''
|
||||||
|
for exe in exes:
|
||||||
|
if os.path.basename(exe) == 'python':
|
||||||
|
variants += '+pythoncmd'
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
variants += '~pythoncmd'
|
||||||
|
|
||||||
for module in ['readline', 'sqlite3', 'dbm', 'nis',
|
for module in ['readline', 'sqlite3', 'dbm', 'nis',
|
||||||
'zlib', 'bz2', 'lzma', 'ctypes', 'uuid']:
|
'zlib', 'bz2', 'lzma', 'ctypes', 'uuid']:
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user