Open smphhh opened 8 months ago
probably sensible to update dep.validate(raise_error=not op.skipped)
so that it doesn't raise an error for uninstalls (op.job_type == "uninstall"
) - pull request welcome I expect
I encountered the same bug, here're the steps to reproduce:
example
in pyproject.toml
example
from source with editable version pip install -e /path/to/example
example
in pyproject.toml
I did some investigations, I think the root cause is poetry use the incorrect distribution of editable installations.
when there're editable library in the python env, the editable path, /path/to/example/src
in this case, will be always append in the sys.path
, and in this code:
https://github.com/python-poetry/poetry/blob/main/src/poetry/repositories/installed_repository.py#L241
poetry will always pick example.egg-info
from this path, the example.egg-info
is generated by the pip install
command. while example.egg-info
is not the actual distribution, you can use meta.distribution("example")
to get the correct one, the correct one should be example-{version}.dist-info
.
Unfortunately, I did not manage to find a proper way to fix this without impact the previous logic too much.
Getting this as of poetry 1.8.3 on python 3.10.1
Description
Workarounds
Poetry Installation Method
pipx
Operating System
MacOS 14.3.1
Poetry Version
1.8.1
Poetry Configuration
Python Sysconfig
No response
Example pyproject.toml
No response
Poetry Runtime Logs