mesonbuild / mesonbuild/meson-python
pip install overrides existing build configuration
- Dominant language
- Python
- Stars
- 180
- Forks
- 93
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 18
Description
When using `meson-python` with editable installs, running `pip install -e` a second time, reusing the build directory, but without repeating the `buildtype` argument overwrites the existing build configuration.
## Reproduction
```bash
#!/usr/bin/env bash
mkdir repro
# Create files for meson-python
cat < repro/pyproject.toml
[project]
name = "foo"
version = "0.0.1"
[build-system]
build-backend = "mesonpy"
requires = ["meson-python"]
EOF
cat < repro/meson.build
project('foo', 'c', version: '0.1.0')
EOF
python -m pip install meson-python
# Create a debug build
pip install --no-build-isolation -e repro -Csetup-args=-Dbuildtype=debug -Cbuild-dir=debug
grep buildtype repro/debug/meson-logs/meson-setup.txt
# buildtype : debug
# If I decide to reuse this build directory,
# and I call `pip install` without `-Csetup-args=-Dbuildtype=debug`
# it reconfigures to have `buildtype=release` instead of reusing the current configuration.
pip install --no-build-isolation -e repro -Cbuild-dir=debug
grep buildtype repro/debug/meson-logs/meson-setup.txt
# buildtype : release
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue using the supplied pyproject.toml and meson.build, then compare repro/debug/meson-logs/meson-setup.txt after the two pip install -e commands. Trace how the build directory and setup arguments are handled on the second invocation; done means rerunning without -Csetup-args preserves the existing debug buildtype.
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
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100