-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
Description
This is something I (re)discovered while working on making pip list and pip freeze support PEP 610 for modern editables.
Assume a setuptools project using the src layout, without VCS, and installed in editable mode.
Running pip freeze will output the parent directory of the .egg-info directory, which is the src directory and not where setup.py is located, making reinstallation from the frozen requirement impossible.
This is fixable in principle because the .egg-link file contains a second line pointing to the setup.py directory.
I'm not sure this is something we will want to fix, but I report it for the record and discussion in case anyone has an any insight on the matter.
Expected behavior
No response
pip version
latest and probably all
Python version
3
OS
any
How to Reproduce
Assuming this setup.py:
from setuptools import setup
setup(
name="pkga",
packages=["pkga"],
package_dir={"": "src"},
)
Run pip install -e ., followed by pip freeze. Notice that the directory produced by pip freeze does not point to the setup.py directory but to the src directory.
Output
No response
Code of Conduct
- I agree to follow the PSF Code of Conduct.