Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -1931,6 +1931,7 @@
"libgrapheme"
],
"versions": [
"2.0.2-3",
"2.0.2-2",
"2.0.2-1"
]
Expand Down
1 change: 0 additions & 1 deletion subprojects/packagefiles/libgrapheme/gen/chdir_wrapper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
import os, sys, subprocess

os.chdir(os.environ['PROJECT_SOURCE_ROOT'])
Expand Down
9 changes: 8 additions & 1 deletion subprojects/packagefiles/libgrapheme/gen/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ gen_headers_tgt = {
}

chdir_wrapper = files('chdir_wrapper.py')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to undo all of these changes (including the removal of the #! line) and just change this to

Suggested change
chdir_wrapper = files('chdir_wrapper.py')
chdir_wrapper = find_program('chdir_wrapper.py')

Meson has a special case for scripts starting with #!/usr/bin/env python3, so execute permission shouldn't be needed. However, with custom_target() this works for find_program() but not for files().

python_exe = find_program(
'python',
'python3',
required: true,
native: true,
version: '>=3',
)
gen_headers = []
foreach exe_name, data_files : gen_headers_tgt
src = exe_name + '.c'
Expand All @@ -37,7 +44,7 @@ foreach exe_name, data_files : gen_headers_tgt
hdr,
output: hdr,
depend_files: data_files,
command: [chdir_wrapper, exe],
command: [python_exe, chdir_wrapper, exe],
env: {
'PROJECT_SOURCE_ROOT': meson.project_source_root(),
},
Expand Down
Loading