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
@ -100,7 +100,8 @@ def fix_python_path(self):
|
|||||||
files = ['gobject/glib-genmarshal.in', 'gobject/glib-mkenums.in']
|
files = ['gobject/glib-genmarshal.in', 'gobject/glib-mkenums.in']
|
||||||
|
|
||||||
filter_file('^#!/usr/bin/env @PYTHON@',
|
filter_file('^#!/usr/bin/env @PYTHON@',
|
||||||
'#!/usr/bin/env python',
|
'#!/usr/bin/env {0}'.format(
|
||||||
|
os.path.basename(self.spec['python'].command.path)),
|
||||||
*files)
|
*files)
|
||||||
|
|
||||||
@run_before('configure')
|
@run_before('configure')
|
||||||
@ -119,7 +120,8 @@ def fix_dtrace_usr_bin_path(self):
|
|||||||
copy(dtrace, dtrace_copy)
|
copy(dtrace, dtrace_copy)
|
||||||
filter_file(
|
filter_file(
|
||||||
'^#!/usr/bin/python',
|
'^#!/usr/bin/python',
|
||||||
'#!/usr/bin/env python',
|
'#!/usr/bin/env {0}'.format(
|
||||||
|
os.path.basename(self.spec['python'].command.path)),
|
||||||
dtrace_copy
|
dtrace_copy
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -135,7 +137,8 @@ def filter_sbang(self):
|
|||||||
# this after install because otherwise the install target will try
|
# this after install because otherwise the install target will try
|
||||||
# to rebuild files as filter_file updates the timestamps)
|
# to rebuild files as filter_file updates the timestamps)
|
||||||
if self.spec.satisfies('@2.53.4:'):
|
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)
|
repl = '#!{0}'.format(self.spec['python'].command.path)
|
||||||
files = ['glib-genmarshal', 'glib-mkenums']
|
files = ['glib-genmarshal', 'glib-mkenums']
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user