When using setup.py
,
pip install -e .
creates a my_app.egg-info
directory containing a PKG-INFO
file.
After moving to pyproject.toml
, the same install procedure doesn’t update or remove that directory.
It seems that
importlib.metadata.version("my_app")
uses PKG-INFO
to determine the package version, which results in a wrong reported version in our setup.
This is fixed by removing the outdated directory manually.
This caught us by surprise and I’m wondering if this is expected behaviour or if a bug should be opened somewhere to somehow fix this. I’d be happy if someone could shed light on this as I don’t know exactly where to look to figure it out.