mesonbuild / mesonbuild/meson-python
install_mode is ignored
- Dominant language
- Python
- Stars
- 180
- Forks
- 93
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 18
Description
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
```meson
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--)
```python
#!/usr/bin/env python3
print("@greeting@")
```
pyproject.toml
```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`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the minimal example in meson.build, meson_python_bug.py.in, and pyproject.toml, then compare direct Meson/Ninja installation with pip install. Trace how install_mode is handled during the pip build and verify completion by installing the example and running meson_python_bug.py without a permission error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100