-
Notifications
You must be signed in to change notification settings - Fork 3.1k
pip show and missing/incorrect metadata with pyproject.toml #13287
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
Comments
Searching both external and within issues found several similar issues nothing helpful so far. I've tried more-and-less setuptools config blocks without any success (currently less as directed in some related discussions as well as setuptools docs). Thanks in advance! |
As a followup, the missing files data is accessible to importlib:
|
I could be missing something obvious/not-so-obvious but this really feels like |
I tried this locally (Windows, Python 3.13). I ran the following commands:
I see the correct list of files, and location. Even if I omit |
I reproduced the problem with python-3.10.12 and pip-25.0.1 on ubuntu 22.04
|
3.13 on ubuntu 24.04
|
Is this with the system pip? If so, can you reproduce with pip from PyPI? I believe Ubuntu patch the version of pip they supply. |
@pfmoore mine is not system, it is in venv from which
|
@sarnold [testenv]
skip_install = true
setenv =
COVERAGE_FILE = .coverage.{envname}
PYTHONPATH = {toxinidir}/src If you look closely at your log, pip is picking up this "installed" pyserv and refuses to uninstall it as it's outside the virtual environment directory.
This results in the actual pyserv installation being shadowed (while the PYTHONPATH envvar is set). I haven't looked at your tox configuration that closely, but this seems like poor practice...? You should test against the built distribution to ensure your packaging configuration is not faulty. If not, you may end up missing packaging blunders that your users will encounter. |
"Well I'll be a dirty..." With all the environment isolation in newer Tox versions that seems like a bug, but removing that from setenv in the default [testenv] does indeed populate metadata for both Files and Location correctly when displayed from the [check] environment. Thanks for the eye/brain poke! |
I'm glad to have helped! |
Description
Scenario is installing locally built wheel into virtualenv in project checkout, with all metadata in pyproject.toml. Running
python -m pip show -f pyserv
displays incorrect data and claims "Cannot locate RECORD or installed-files.txt" when the RECORD file does indeed exist in the installed.dist-info/
. TheFiles:
list is empty and theLocation:
displayed is not in the virtualenv site-packages (instead it displays thesrc
directory in the project root.Expected behavior
The equivalent display when using setup.cfg for metadata, ie the list of files from virtualenv site-packages and the correct virtualenv location.
pip version
pip 25.0.1
Python version
3.12.8
OS
Gentoo Linux
How to Reproduce
packaging-fixes
branchtox-e build,check
pip show
Output
The relevant output from below:
Full build output:
Code of Conduct
The text was updated successfully, but these errors were encountered: