astral-sh/uv

[Feature] Allow setting no-editable in `pyproject.toml`

Open

#8 124 ouverte le 11 oct. 2024

Voir sur GitHub
 (7 commentaires) (1 réaction) (0 assignés)Rust (3 111 forks)batch import
enhancementhelp wanted

Métriques du dépôt

Stars
 (84 934 stars)
Métriques de merge PR
 (Merge moyen 7j 16h) (259 PRs mergées en 30 j)

Description

My project includes multiple native C modules with a rather complicated build setup. Editable installs of my package don't work as expected:

When I run uv build, it ends up creating ./.venv/lib/python3.12/site-packages/my_package/ which contains lots of .so files, and it also creates a ./.venv/lib/python3.12/site-packages/_my_package.pth. When I run my tests, the .so modules are not found because the _my_package.pth takes precedence and points to my source dir.

Using the --no-editable flag works around this, but I need to specify it every time I run a uv command, or else uv will re-sync and create an editable install.

It would be preferable to specify this in my pyproject.toml, for example:

[tool.uv]
no-editable = true

Guide contributeur