Skip to content

Commit a87407a

Browse files
committed
libgrapheme: use find_program instead of relying on shebang
Apparently during testing it slipped through that meson does not apply file permissions from packagefiles. So we do not execute the chdir_wrapper directly now. Instead we search for a python executable and call the interpreter with the script instead.
1 parent a28d692 commit a87407a

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

releases.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,6 +1931,7 @@
19311931
"libgrapheme"
19321932
],
19331933
"versions": [
1934+
"2.0.2-3",
19341935
"2.0.2-2",
19351936
"2.0.2-1"
19361937
]

subprojects/packagefiles/libgrapheme/gen/chdir_wrapper.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python3
21
import os, sys, subprocess
32

43
os.chdir(os.environ['PROJECT_SOURCE_ROOT'])

subprojects/packagefiles/libgrapheme/gen/meson.build

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ gen_headers_tgt = {
2424
}
2525

2626
chdir_wrapper = files('chdir_wrapper.py')
27+
python_exe = find_program(
28+
'python',
29+
'python3',
30+
required: true,
31+
native: true,
32+
version: '>=3',
33+
)
2734
gen_headers = []
2835
foreach exe_name, data_files : gen_headers_tgt
2936
src = exe_name + '.c'
@@ -37,7 +44,7 @@ foreach exe_name, data_files : gen_headers_tgt
3744
hdr,
3845
output: hdr,
3946
depend_files: data_files,
40-
command: [chdir_wrapper, exe],
47+
command: [python_exe, chdir_wrapper, exe],
4148
env: {
4249
'PROJECT_SOURCE_ROOT': meson.project_source_root(),
4350
},

0 commit comments

Comments
 (0)