Today, the editable installer (poetry>1.0.10), does not handle removals of files (includes, console scripts etc.) cleanly. This needs to be improved.
There are two potential approaches,
- Handle the delta manually by using the
*.dist-info/RECORD csv file. We could load the list prior to new install and then identify the delta after installation.
- Uninstall editable package explicitly (this today might need to use pip until poetry has an internal mechanism) prior to installation again. This might be cleaner as this should separate the concerns cleanly.
Reproduction
This issue can be reproduced as follows.
poetry new foo
pushd foo
sed -i /pytest/d pyproject.toml
echo 'def main(): print("hello world")' >> foo/__init__.py
printf '\n\n[tool.poetry.scripts]\nhello = "foo:main"' >> pyproject.toml
poetry install
sed -i s/hello/world/g pyproject.toml
poetry install
Today, once this is done, the following happens.
$ poetry run type hello
hello is /tmp/foo/.venv/bin/hello
We expect this to happen.
$ poetry run type hello
/usr/bin/type: line 2: type: hello: not found
Today, the editable installer (
poetry>1.0.10), does not handle removals of files (includes, console scripts etc.) cleanly. This needs to be improved.There are two potential approaches,
*.dist-info/RECORDcsv file. We could load the list prior to new install and then identify the delta after installation.Reproduction
This issue can be reproduced as follows.
Today, once this is done, the following happens.
We expect this to happen.