meson-python doesn't set the permissions specified in the install_mode argument of configure_file or install_data. This is useful for configuring files, where you don't want the source file to be executable (since it doesn't work due to the placeholders) but you want it to be executable once installed.
Example:
meson.build
project('meson-python-bug', version: '0.1.0')
configure_file(
input: 'meson_python_bug.py.in',
output: 'meson_python_bug.py',
configuration: { 'greeting': 'Hello, Meson!' },
install: true,
install_dir: get_option('bindir'),
install_mode: 'rwxr-xr-x',
)
meson_python_bug.py.in (rw-r--r--)
#!/usr/bin/env python3
print("@greeting@")
pyproject.toml
[build-system]
build-backend = 'mesonpy'
requires = ['meson-python']
Installing this minimal example using meson/ninja directly works, but installing via pip install . and trying to run meson_python_bug.py gives an error: bash: /home/jwestman/.local/bin/meson_python_bug.py: Permission denied.
meson-python doesn't set the permissions specified in the
install_modeargument ofconfigure_fileorinstall_data. This is useful for configuring files, where you don't want the source file to be executable (since it doesn't work due to the placeholders) but you want it to be executable once installed.Example:
meson.build
meson_python_bug.py.in (rw-r--r--)
pyproject.toml
Installing this minimal example using meson/ninja directly works, but installing via
pip install .and trying to runmeson_python_bug.pygives an error:bash: /home/jwestman/.local/bin/meson_python_bug.py: Permission denied.