glib: Use correct python command (#13392)
python~pythoncmd does not provide a python symlink for python3, so make sure we pick the right command.
This commit is contained in:
parent
25d63aa44c
commit
464ce2795a
1 changed files with 6 additions and 3 deletions
|
@ -100,7 +100,8 @@ def fix_python_path(self):
|
|||
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 @@ def fix_dtrace_usr_bin_path(self):
|
|||
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 @@ def filter_sbang(self):
|
|||
# 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:
|
||||
|
|
Loading…
Reference in a new issue