Open juan-abia opened 1 day ago
I got the same issue too.
same problem here as well
I don't think you can have an outer and inner pyproject.toml
with the same name — those names must be unique when normalized and we must normalize them for comparison per the Python standards.
Can you explain more about how it's overwritten? And why you're using this structure in the first place?
Yeah that's not a valid structure. It's like saying you want two packages on PyPI called foo_bar
and foo-bar
, and you want to be able to use them distinctly.
So for this example:
/private/tmp/super-project git:[main]
tree
.
├── super_project
│ ├── README.md
│ └── pyproject.toml
├── super_project_2
│ ├── README.md
│ └── pyproject.toml
├── README.md
├── pyproject.toml
└── uv.lock
I want only two packages published to Pypi: super-project
and super-project-2
.
I'd like the two folders to be uv workspaces. When I'm developing locally I'd like to install dependencies of both packages. Is there any way I can do this with uv?
Can you explain more about how it's overwritten?
With this structure, if I do uv add --dev pytest
for example. The pyproject of the root folder gets completely overwritten by:
pyproject of super_project
(with underscore, the package) + dev group dependency with pytest
I have the following folder structure:
This is a common use case in my company. The repo name is
super-project
and the name of the python package we publish issuper_project
.This is the content of the root pyproject.toml:
This is the pyproject of the package:
When I run
uv run pytest
y get the next error:And worse. If I try to do uv add pytest, my root pyproject gets overwriten with the pyproject of the package.
I guess the issue is related to https://github.com/astral-sh/uv/issues/8591