New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Source files aren't listed in dist-info/RECORD for editable installs. #609
Comments
If |
That's the clarification I wanted, thank you! |
This comment was marked as resolved.
This comment was marked as resolved.
@merwok Exactly, but in an editable install, the modules are located in the source tree, and only a pointer to those files is installed into the site-packages (that pointer may be a The key here is that I suspect, though, that |
|
Ah, I missed the key word of |
@layday I suspected that was the case. In which case it probably needs to document the limitation somehow, in order to help people hitting this sort of issue. The implementation appears to look for a |
…ere, a work-around for pypa/packaging-problems#609
OS version
Ubuntu 20.04
Python version
3.7.13
Pip version
22.2.2
Guide link
https://packaging.python.org/tutorials/packaging-projects
Problem description
I configured my project exactly like the tutorial, but then before building a wheel and uploading, I want to develop locally with an editable install. I run
pip install -e .
and then a .dist-info directory and a.pth
file are created inside my virtualenv's site-packages. Inside the .dist-info directory, the RECORD file lists only metadata files (readme, license, etc) but no source files. I tested, and if I make a regular install instead (pip install .
) then the RECORD file will correctly list all.py
files. Also, with the editable install, the package can be imported and works as expected. I'm using hatchling as the build backend, but I tested with flit and the behavior is the same.Is the lack of source files in the RECORD expected for an editable install?
Context: as far as I understand, the lack of
.py
files in dist-info/RECORD is what is prevetingimportlib_metadata.packages_distributions()
from listing my package. I have some other local packages installed withpip install -e
which use setuptools/setup.py, and these appear in the site-packages as.egg-link
files. These are correctly listed byimportlib_metadata.packages_distributions()
. Is this a bug in importlib_metadata?The text was updated successfully, but these errors were encountered: