Skip to content

Commit

Permalink
chore(meson-build): document meson-python limitations when used with uv
Browse files Browse the repository at this point in the history
  • Loading branch information
samypr100 committed Oct 7, 2024
1 parent 7f4df4b commit 53753d9
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/concepts/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,29 @@ $ uv run --directory example-lib python -c "import example_lib; print(example_li
Hello from example-lib!
```

Other build backends supported by `uv init` include `hatchling`, `flit-core`, `pdm-backend`,
`setuptools`, `maturin`, `scikit-build-core`, and `meson-python`.

!!! tip

Changes to `lib.rs` or `main.cpp` will require running `--reinstall` when using binary build
backends such as `maturin`, `scikit-build-core`, or `meson-python`.

!!! note

[meson-editable]:
https://mesonbuild.com/meson-python/how-to-guides/editable-installs.html#build-dependencies

When `meson-python` is used with editable installations, it may be beneficial to leverage
`--no-build-isolation` such that changes to `main.cpp` can be automatically rebuilt on import. See
more on this topic in [Meson Editable Installs][meson-editable]. You may also further customize
build isolation behavior using `dependency-metadata` as described in the dedicated
[build isolation](#build-isolation) section.

As of time of writing, `meson-python` cannot detect a moving build environment. As a result,
commands such as `uv sync` or `uv run` will not behave as expected. In such cases, it is recommended
to leverage `--no-editable` instead to avoid errors.

### Packaged applications

The `--package` flag can be passed to `uv init` to create a distributable application, e.g., if you
Expand Down

0 comments on commit 53753d9

Please sign in to comment.