astral-sh/uv

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

Open

#8,124 创建于 2024年10月11日

在 GitHub 查看
 (7 评论) (1 反应) (0 负责人)Rust (3,111 fork)batch import
enhancementhelp wanted

仓库指标

Star
 (84,934 star)
PR 合并指标
 (平均合并 7天 16小时) (30 天内合并 259 个 PR)

描述

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

贡献者指南