summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kuhn <michael.kuhn@informatik.uni-hamburg.de>2019-10-23 16:30:46 +0200
committerAdam J. Stewart <ajstewart426@gmail.com>2019-10-23 09:30:46 -0500
commit464ce2795a6790f67ef65bb6f921855b43bd3305 (patch)
tree5e922abc89bb122dd759aa52be34eeac73dbfff7
parent25d63aa44c240ef22c57bbcbec47ff1d247f6a46 (diff)
downloadspack-464ce2795a6790f67ef65bb6f921855b43bd3305.tar.gz
spack-464ce2795a6790f67ef65bb6f921855b43bd3305.tar.bz2
spack-464ce2795a6790f67ef65bb6f921855b43bd3305.tar.xz
spack-464ce2795a6790f67ef65bb6f921855b43bd3305.zip
glib: Use correct python command (#13392)
python~pythoncmd does not provide a python symlink for python3, so make sure we pick the right command.
-rw-r--r--var/spack/repos/builtin/packages/glib/package.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py
index f6265771d7..f883508449 100644
--- a/var/spack/repos/builtin/packages/glib/package.py
+++ b/var/spack/repos/builtin/packages/glib/package.py
@@ -100,7 +100,8 @@ class Glib(AutotoolsPackage):
files = ['gobject/glib-genmarshal.in', 'gobject/glib-mkenums.in']
filter_file('^#!/usr/bin/env @PYTHON@',
- '#!/usr/bin/env python',
+ '#!/usr/bin/env {0}'.format(
+ os.path.basename(self.spec['python'].command.path)),
*files)
@run_before('configure')
@@ -119,7 +120,8 @@ class Glib(AutotoolsPackage):
copy(dtrace, dtrace_copy)
filter_file(
'^#!/usr/bin/python',
- '#!/usr/bin/env python',
+ '#!/usr/bin/env {0}'.format(
+ os.path.basename(self.spec['python'].command.path)),
dtrace_copy
)
@@ -135,7 +137,8 @@ class Glib(AutotoolsPackage):
# this after install because otherwise the install target will try
# to rebuild files as filter_file updates the timestamps)
if self.spec.satisfies('@2.53.4:'):
- pattern = '^#!/usr/bin/env python'
+ pattern = '^#!/usr/bin/env {0}'.format(
+ os.path.basename(self.spec['python'].command.path))
repl = '#!{0}'.format(self.spec['python'].command.path)
files = ['glib-genmarshal', 'glib-mkenums']
else: