Skip to content

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

Closed
1 task done
sarnold opened this issue Mar 18, 2025 · 11 comments
Closed
1 task done

pip show and missing/incorrect metadata with pyproject.toml #13287

sarnold opened this issue Mar 18, 2025 · 11 comments
Labels
type: support User Support

Comments

@sarnold
Copy link

sarnold commented Mar 18, 2025

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/. The Files: list is empty and the Location: displayed is not in the virtualenv site-packages (instead it displays the src 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

  1. clone https://github.com/sarnold/pyserv.git
  2. checkout packaging-fixes branch
  3. run tox-e build,check
  4. view the output of pip show

Output

The relevant output from below:

check: commands[1]> python -m pip show -f pyserv
Name: pyserv
Version: 1.7.1.dev2+g37322f6.d20250318
Summary: A collection of simple servers for HTTP, WSGI, and TFTP
Home-page: https://github.com/user/pyserv
Author: Stephen Arnold
Author-email: [email protected]
License: MIT
Location: /home/user/src/python-servers/src
Requires: daemonizer, platformdirs, py3tftp, tftpy
Required-by: 
Files:
Cannot locate RECORD or installed-files.txt

Full build output:

$ tox -e build,check 
build: install_deps> python -I -m pip install build 'pip>=23.1' twine
build: commands[0]> python -m build .
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
  - setuptools>=61
  - setuptools_scm[toml]>=6.2
* Getting build dependencies for sdist...
running egg_info
creating src/pyserv.egg-info
writing src/pyserv.egg-info/PKG-INFO
writing dependency_links to src/pyserv.egg-info/dependency_links.txt
writing entry points to src/pyserv.egg-info/entry_points.txt
writing requirements to src/pyserv.egg-info/requires.txt
writing top-level names to src/pyserv.egg-info/top_level.txt
writing manifest file 'src/pyserv.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSES/MIT.txt'
writing manifest file 'src/pyserv.egg-info/SOURCES.txt'
* Building sdist...
running sdist
running egg_info
writing src/pyserv.egg-info/PKG-INFO
writing dependency_links to src/pyserv.egg-info/dependency_links.txt
writing entry points to src/pyserv.egg-info/entry_points.txt
writing requirements to src/pyserv.egg-info/requires.txt
writing top-level names to src/pyserv.egg-info/top_level.txt
reading manifest template 'MANIFEST.in'
adding license file 'LICENSES/MIT.txt'
writing manifest file 'src/pyserv.egg-info/SOURCES.txt'
running check
creating pyserv-1.7.1.dev2+g37322f6.d20250318
creating pyserv-1.7.1.dev2+g37322f6.d20250318/.github
creating pyserv-1.7.1.dev2+g37322f6.d20250318/.github/ISSUE_TEMPLATE
creating pyserv-1.7.1.dev2+g37322f6.d20250318/.github/workflows
creating pyserv-1.7.1.dev2+g37322f6.d20250318/LICENSES
creating pyserv-1.7.1.dev2+g37322f6.d20250318/docs
creating pyserv-1.7.1.dev2+g37322f6.d20250318/docs/source
creating pyserv-1.7.1.dev2+g37322f6.d20250318/scripts
creating pyserv-1.7.1.dev2+g37322f6.d20250318/src/pyserv
creating pyserv-1.7.1.dev2+g37322f6.d20250318/src/pyserv.egg-info
creating pyserv-1.7.1.dev2+g37322f6.d20250318/tests
creating pyserv-1.7.1.dev2+g37322f6.d20250318/tests/data
copying files to pyserv-1.7.1.dev2+g37322f6.d20250318...
copying .env.local -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying .env.upgrade -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying .gitchangelog.rc -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying .gitignore -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying .pep8speaks.yml -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying .pre-commit-config.yaml -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying .repolite.yml -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying CHANGELOG.rst -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying LICENSE -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying MANIFEST.in -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying Procfile.upgrade -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying README.rst -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying REUSE.toml -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying environment.devenv.yml -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying mypy.ini -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying pyproject.toml -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying requirements.txt -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying setup.py -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying tox.ini -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying toxfile.py -> pyserv-1.7.1.dev2+g37322f6.d20250318
copying .github/dependabot.yml -> pyserv-1.7.1.dev2+g37322f6.d20250318/.github
copying .github/fix_pkg_name.sh -> pyserv-1.7.1.dev2+g37322f6.d20250318/.github
copying .github/ISSUE_TEMPLATE/bug_report.md -> pyserv-1.7.1.dev2+g37322f6.d20250318/.github/ISSUE_TEMPLATE
copying .github/ISSUE_TEMPLATE/feature_request.md -> pyserv-1.7.1.dev2+g37322f6.d20250318/.github/ISSUE_TEMPLATE
copying .github/workflows/autobot.yml -> pyserv-1.7.1.dev2+g37322f6.d20250318/.github/workflows
copying .github/workflows/autopersonal.yml -> pyserv-1.7.1.dev2+g37322f6.d20250318/.github/workflows
copying .github/workflows/bandit.yml -> pyserv-1.7.1.dev2+g37322f6.d20250318/.github/workflows
copying .github/workflows/ci.yml -> pyserv-1.7.1.dev2+g37322f6.d20250318/.github/workflows
copying .github/workflows/coverage.yml -> pyserv-1.7.1.dev2+g37322f6.d20250318/.github/workflows
copying .github/workflows/pylint.yml -> pyserv-1.7.1.dev2+g37322f6.d20250318/.github/workflows
copying .github/workflows/release.yml -> pyserv-1.7.1.dev2+g37322f6.d20250318/.github/workflows
copying .github/workflows/sphinx.yml -> pyserv-1.7.1.dev2+g37322f6.d20250318/.github/workflows
copying .github/workflows/wheels.yml -> pyserv-1.7.1.dev2+g37322f6.d20250318/.github/workflows
copying LICENSES/MIT.txt -> pyserv-1.7.1.dev2+g37322f6.d20250318/LICENSES
copying docs/Makefile -> pyserv-1.7.1.dev2+g37322f6.d20250318/docs
copying docs/make.bat -> pyserv-1.7.1.dev2+g37322f6.d20250318/docs
copying docs/source/CHANGELOG.rst -> pyserv-1.7.1.dev2+g37322f6.d20250318/docs/source
copying docs/source/README.rst -> pyserv-1.7.1.dev2+g37322f6.d20250318/docs/source
copying docs/source/conf.py -> pyserv-1.7.1.dev2+g37322f6.d20250318/docs/source
copying docs/source/index.rst -> pyserv-1.7.1.dev2+g37322f6.d20250318/docs/source
copying scripts/atftpdaemon -> pyserv-1.7.1.dev2+g37322f6.d20250318/scripts
copying scripts/atftpdaemon.py -> pyserv-1.7.1.dev2+g37322f6.d20250318/scripts
copying scripts/httpdaemon -> pyserv-1.7.1.dev2+g37322f6.d20250318/scripts
copying scripts/httpdaemon.py -> pyserv-1.7.1.dev2+g37322f6.d20250318/scripts
copying scripts/tftpdaemon -> pyserv-1.7.1.dev2+g37322f6.d20250318/scripts
copying scripts/tftpdaemon.py -> pyserv-1.7.1.dev2+g37322f6.d20250318/scripts
copying src/pyserv/__init__.py -> pyserv-1.7.1.dev2+g37322f6.d20250318/src/pyserv
copying src/pyserv/ext.py -> pyserv-1.7.1.dev2+g37322f6.d20250318/src/pyserv
copying src/pyserv/server.py -> pyserv-1.7.1.dev2+g37322f6.d20250318/src/pyserv
copying src/pyserv/settings.py -> pyserv-1.7.1.dev2+g37322f6.d20250318/src/pyserv
copying src/pyserv/tftpd.py -> pyserv-1.7.1.dev2+g37322f6.d20250318/src/pyserv
copying src/pyserv/wsgi.py -> pyserv-1.7.1.dev2+g37322f6.d20250318/src/pyserv
copying src/pyserv.egg-info/PKG-INFO -> pyserv-1.7.1.dev2+g37322f6.d20250318/src/pyserv.egg-info
copying src/pyserv.egg-info/SOURCES.txt -> pyserv-1.7.1.dev2+g37322f6.d20250318/src/pyserv.egg-info
copying src/pyserv.egg-info/dependency_links.txt -> pyserv-1.7.1.dev2+g37322f6.d20250318/src/pyserv.egg-info
copying src/pyserv.egg-info/entry_points.txt -> pyserv-1.7.1.dev2+g37322f6.d20250318/src/pyserv.egg-info
copying src/pyserv.egg-info/requires.txt -> pyserv-1.7.1.dev2+g37322f6.d20250318/src/pyserv.egg-info
copying src/pyserv.egg-info/top_level.txt -> pyserv-1.7.1.dev2+g37322f6.d20250318/src/pyserv.egg-info
copying tests/__init__.py -> pyserv-1.7.1.dev2+g37322f6.d20250318/tests
copying tests/check_daemon.py -> pyserv-1.7.1.dev2+g37322f6.d20250318/tests
copying tests/test_extras.py -> pyserv-1.7.1.dev2+g37322f6.d20250318/tests
copying tests/test_handler.py -> pyserv-1.7.1.dev2+g37322f6.d20250318/tests
copying tests/test_serv.py -> pyserv-1.7.1.dev2+g37322f6.d20250318/tests
copying tests/data/.gitkeep -> pyserv-1.7.1.dev2+g37322f6.d20250318/tests/data
copying src/pyserv.egg-info/SOURCES.txt -> pyserv-1.7.1.dev2+g37322f6.d20250318/src/pyserv.egg-info
Writing pyserv-1.7.1.dev2+g37322f6.d20250318/setup.cfg
Creating tar archive
removing 'pyserv-1.7.1.dev2+g37322f6.d20250318' (and everything under it)
* Building wheel from sdist
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
  - setuptools>=61
  - setuptools_scm[toml]>=6.2
* Getting build dependencies for wheel...
running egg_info
writing src/pyserv.egg-info/PKG-INFO
writing dependency_links to src/pyserv.egg-info/dependency_links.txt
writing entry points to src/pyserv.egg-info/entry_points.txt
writing requirements to src/pyserv.egg-info/requires.txt
writing top-level names to src/pyserv.egg-info/top_level.txt
ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
reading manifest file 'src/pyserv.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSES/MIT.txt'
writing manifest file 'src/pyserv.egg-info/SOURCES.txt'
* Building wheel...
running bdist_wheel
running build
running build_py
creating build/lib/pyserv
copying src/pyserv/server.py -> build/lib/pyserv
copying src/pyserv/tftpd.py -> build/lib/pyserv
copying src/pyserv/settings.py -> build/lib/pyserv
copying src/pyserv/ext.py -> build/lib/pyserv
copying src/pyserv/__init__.py -> build/lib/pyserv
copying src/pyserv/wsgi.py -> build/lib/pyserv
running egg_info
writing src/pyserv.egg-info/PKG-INFO
writing dependency_links to src/pyserv.egg-info/dependency_links.txt
writing entry points to src/pyserv.egg-info/entry_points.txt
writing requirements to src/pyserv.egg-info/requires.txt
writing top-level names to src/pyserv.egg-info/top_level.txt
ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
reading manifest file 'src/pyserv.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSES/MIT.txt'
writing manifest file 'src/pyserv.egg-info/SOURCES.txt'
running build_scripts
creating build/scripts-3.12
copying and adjusting scripts/atftpdaemon -> build/scripts-3.12
copying and adjusting scripts/httpdaemon -> build/scripts-3.12
copying and adjusting scripts/tftpdaemon -> build/scripts-3.12
changing mode of build/scripts-3.12/atftpdaemon from 644 to 755
changing mode of build/scripts-3.12/httpdaemon from 644 to 755
changing mode of build/scripts-3.12/tftpdaemon from 644 to 755
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/pyserv
copying build/lib/pyserv/server.py -> build/bdist.linux-x86_64/wheel/./pyserv
copying build/lib/pyserv/tftpd.py -> build/bdist.linux-x86_64/wheel/./pyserv
copying build/lib/pyserv/settings.py -> build/bdist.linux-x86_64/wheel/./pyserv
copying build/lib/pyserv/ext.py -> build/bdist.linux-x86_64/wheel/./pyserv
copying build/lib/pyserv/__init__.py -> build/bdist.linux-x86_64/wheel/./pyserv
copying build/lib/pyserv/wsgi.py -> build/bdist.linux-x86_64/wheel/./pyserv
running install_egg_info
Copying src/pyserv.egg-info to build/bdist.linux-x86_64/wheel/./pyserv-1.7.1.dev2+g37322f6.d20250318-py3.12.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/pyserv-1.7.1.dev2+g37322f6.d20250318.data/scripts
copying build/scripts-3.12/httpdaemon -> build/bdist.linux-x86_64/wheel/pyserv-1.7.1.dev2+g37322f6.d20250318.data/scripts
copying build/scripts-3.12/tftpdaemon -> build/bdist.linux-x86_64/wheel/pyserv-1.7.1.dev2+g37322f6.d20250318.data/scripts
copying build/scripts-3.12/atftpdaemon -> build/bdist.linux-x86_64/wheel/pyserv-1.7.1.dev2+g37322f6.d20250318.data/scripts
changing mode of build/bdist.linux-x86_64/wheel/pyserv-1.7.1.dev2+g37322f6.d20250318.data/scripts/httpdaemon to 755
changing mode of build/bdist.linux-x86_64/wheel/pyserv-1.7.1.dev2+g37322f6.d20250318.data/scripts/tftpdaemon to 755
changing mode of build/bdist.linux-x86_64/wheel/pyserv-1.7.1.dev2+g37322f6.d20250318.data/scripts/atftpdaemon to 755
creating build/bdist.linux-x86_64/wheel/pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/WHEEL
creating '/home/user/src/python-servers/dist/.tmp-r3vy8sac/pyserv-1.7.1.dev2+g37322f6.d20250318-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'pyserv/__init__.py'
adding 'pyserv/ext.py'
adding 'pyserv/server.py'
adding 'pyserv/settings.py'
adding 'pyserv/tftpd.py'
adding 'pyserv/wsgi.py'
adding 'pyserv-1.7.1.dev2+g37322f6.d20250318.data/scripts/atftpdaemon'
adding 'pyserv-1.7.1.dev2+g37322f6.d20250318.data/scripts/httpdaemon'
adding 'pyserv-1.7.1.dev2+g37322f6.d20250318.data/scripts/tftpdaemon'
adding 'pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/METADATA'
adding 'pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/MIT.txt'
adding 'pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/WHEEL'
adding 'pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/entry_points.txt'
adding 'pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/top_level.txt'
adding 'pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built pyserv-1.7.1.dev2+g37322f6.d20250318.tar.gz and pyserv-1.7.1.dev2+g37322f6.d20250318-py3-none-any.whl
build: commands[1]> twine check 'dist/*'
Checking dist/pyserv-1.7.1.dev2+g37322f6.d20250318-py3-none-any.whl: PASSED
Checking dist/pyserv-1.7.1.dev2+g37322f6.d20250318.tar.gz: PASSED
build: OK ✔ in 6.77 seconds
check: install_deps> python -I -m pip install 'pip>=21.1' requests
check: commands[0]> python -m pip install pyserv --force --pre --only-binary :all: -f dist/
Looking in links: dist/
Processing ./dist/pyserv-1.7.1.dev2+g37322f6.d20250318-py3-none-any.whl
Collecting daemonizer@ git+https://github.com/user/[email protected]#69d4c9b6f3916cd5ae87c8b3a78eca1015eeed0f (from pyserv)
  Cloning https://github.com/user/python-daemonizer.git (to revision 0.4.1) to /tmp/pip-install-pa9s_53w/daemonizer_e67c2f5b1eca4a4eb3b15e847633699d
  Running command git clone --filter=blob:none --quiet https://github.com/user/python-daemonizer.git /tmp/pip-install-pa9s_53w/daemonizer_e67c2f5b1eca4a4eb3b15e847633699d
  Running command git checkout -q 93892befb6f8cd1ee8bed1cab3175bf9cbbd71d9
  Resolved https://github.com/user/python-daemonizer.git to commit 93892befb6f8cd1ee8bed1cab3175bf9cbbd71d9
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting tftpy@ git+https://github.com/VCTLabs/[email protected]#58d1f5c60af2e3759fbb137b89816954d8ea6bc9 (from pyserv)
  Cloning https://github.com/VCTLabs/tftpy.git (to revision 0.8.2.1) to /tmp/pip-install-pa9s_53w/tftpy_0f3dbf7983fc4b41a6be1edc807356f7
  Running command git clone --filter=blob:none --quiet https://github.com/VCTLabs/tftpy.git /tmp/pip-install-pa9s_53w/tftpy_0f3dbf7983fc4b41a6be1edc807356f7
  Running command git checkout -q b86ad32089b152e03103cb45eb41421bc29d76dc
  Resolved https://github.com/VCTLabs/tftpy.git to commit b86ad32089b152e03103cb45eb41421bc29d76dc
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting platformdirs (from pyserv)
  Using cached platformdirs-4.3.6-py3-none-any.whl.metadata (11 kB)
Collecting py3tftp (from pyserv)
  Using cached py3tftp-1.3.0-py3-none-any.whl.metadata (6.9 kB)
Using cached platformdirs-4.3.6-py3-none-any.whl (18 kB)
Using cached py3tftp-1.3.0-py3-none-any.whl (17 kB)
Building wheels for collected packages: daemonizer, tftpy
  Building wheel for daemonizer (pyproject.toml) ... done
  Created wheel for daemonizer: filename=daemonizer-0.4.1-py3-none-any.whl size=15664 sha256=2a1b8eb362329e5d8bd75d9a84657b0374661a3d596fe2a56eb06e65c874f23c
  Stored in directory: /tmp/pip-ephem-wheel-cache-r8bgdrxw/wheels/8e/68/cd/523c9dfb6ac96a8f8f564ea6631adf1511742524c57bf31705
  Building wheel for tftpy (pyproject.toml) ... done
  Created wheel for tftpy: filename=tftpy-0.8.2.1-py3-none-any.whl size=29558 sha256=f824476c0526c3695082c576e84b10e814a7344a6460fd576645af08e32b33ae
  Stored in directory: /tmp/pip-ephem-wheel-cache-r8bgdrxw/wheels/b5/dd/70/f4c60dc5344403d93ef07c178ffccea266f59df95472b111b1
Successfully built daemonizer tftpy
Installing collected packages: py3tftp, tftpy, platformdirs, daemonizer, pyserv
  Attempting uninstall: pyserv
    Found existing installation: pyserv 1.7.1.dev2+g37322f6.d20250318
    Not uninstalling pyserv at /home/user/src/python-servers/src, outside environment /home/user/src/python-servers/.tox/check
    Can't uninstall 'pyserv'. No files were found to uninstall.
Successfully installed daemonizer-0.4.1 platformdirs-4.3.6 py3tftp-1.3.0 pyserv-1.7.1.dev2+g37322f6.d20250318 tftpy-0.8.2.1
check: commands[1]> python -m pip show -f pyserv
Name: pyserv
Version: 1.7.1.dev2+g37322f6.d20250318
Summary: A collection of simple servers for HTTP, WSGI, and TFTP
Home-page: https://github.com/user/pyserv
Author: Stephen Arnold
Author-email: [email protected]
License: MIT
Location: /home/user/src/python-servers/src
Requires: daemonizer, platformdirs, py3tftp, tftpy
Required-by: 
Files:
Cannot locate RECORD or installed-files.txt
check: commands[2]> python -c 'import pyserv; print(pyserv.__description__)'
A collection of simple servers for HTTP, WSGI, and TFTP
check: commands[3]> python -c 'from pyserv.settings import show_uservars; show_uservars()'
Python version: 3.12.8 (main, Feb 24 2025, 16:15:20) [GCC 14.2.1 20241221]
-------------------------------------------------------------------------------
pyserv 1.7.1.dev2+g37322f6.d20250318

Pyserv default settings for server and daemon modes.

Default user vars:
  log_dir: /home/user/.local/state/pyserv/log
  pid_dir: /run/user/1000/pyserv
  work_dir: /home/user/src/python-servers

Current environment values:
  DEBUG: 0
  PORT: 8000
  IFACE: 127.0.0.1
  LPNAME: httpd
  LOG: /home/user/.local/state/pyserv/log/httpd.log
  PID: /run/user/1000/pyserv/httpd.pid
  DOCROOT: /home/user/src/python-servers
  SOCK_TIMEOUT: 5
-------------------------------------------------------------------------------
  build: OK (6.77=setup[3.79]+cmd[2.71,0.27] seconds)
  check: OK (9.65=setup[1.04]+cmd[8.33,0.15,0.06,0.07] seconds)
  congratulations :) (16.48 seconds)
$ ls .tox/check/lib/python3.12/site-packages/pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/
entry_points.txt  METADATA  RECORD     top_level.txt
INSTALLER         MIT.txt   REQUESTED  WHEEL
$ cat .tox/check/lib/python3.12/site-packages/pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/RECORD 
../../../bin/atftpdaemon,sha256=x1V84syHAgNR3Q-BTjDQ2rtJDasDLEStbdP63EpDZEI,2831
../../../bin/httpdaemon,sha256=KNSFI9e7LlXF80kY93zRBEETDwMyjO-Qb9_SHPdE9VM,1923
../../../bin/serv,sha256=V8iOubM317N7NPHuLdtESFOwS36yMJySI7ZEnCZlyMk,250
../../../bin/tftpd,sha256=9kTf8wG08NhGoc5HZ_wwR5R_Lbp4p8Lnoj9Q-wUVhH4,249
../../../bin/tftpdaemon,sha256=EicePhnA-8xigDlNqQNnrBXZp9n-29Xq2g-5qQGfM6U,2650
../../../bin/wsgi,sha256=2L9oml1-ZMcmY5iYafVHcWRzoGCT7c9P6qCrJt2lKrk,248
pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/METADATA,sha256=4xZkRtYX4ZzMJ0YzrM7tisYjavuGM5dHFSAzCR78cOA,22336
pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/MIT.txt,sha256=uF3NPkU9BZglUsUrX8ngvdbSPG-OhEuYSoivMlcLDMA,1078
pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/RECORD,,
pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/entry_points.txt,sha256=IH1w9cXwiyLlvCUk7kLAkOg-1Fb6KVDdcVtNDdydlM4,94
pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/top_level.txt,sha256=t390X3AXgskkycZrNG1Xe-B0GQMXhphRglApS4xl0T8,7
pyserv/__init__.py,sha256=C-P1EjAOhVb1h21y7lbxlUbbytV6Og4KC8Jj85PeX0U,4233
pyserv/__pycache__/__init__.cpython-312.pyc,,
pyserv/__pycache__/ext.cpython-312.pyc,,
pyserv/__pycache__/server.cpython-312.pyc,,
pyserv/__pycache__/settings.cpython-312.pyc,,
pyserv/__pycache__/tftpd.cpython-312.pyc,,
pyserv/__pycache__/wsgi.cpython-312.pyc,,
pyserv/ext.py,sha256=L2tuECXCFxz2cOEWXAWZ0mlifTl3-dr7WOn1CxO34E4,1795
pyserv/server.py,sha256=ovWIPqB2BQdnv163a-g7Pwrn9_0xRCZ82VUHUxLaX9k,2153
pyserv/settings.py,sha256=W9m05zxaMDemjTFh2eeZpKrVVk4DUwuRs33jF-G_vo8,2755
pyserv/tftpd.py,sha256=Hd0dqjelRy7MvqcFMSgFEfLJ1W2eYLB3xfwUToFddwI,1839
pyserv/wsgi.py,sha256=BaTw7XYvE25wUjbISGvOqEgNkGGGKcmByItfKi6WhBk,1739

Code of Conduct

@sarnold sarnold added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Mar 18, 2025
@sarnold
Copy link
Author

sarnold commented Mar 18, 2025

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!

@sarnold
Copy link
Author

sarnold commented Mar 18, 2025

As a followup, the missing files data is accessible to importlib:

$ source .tox/check/bin/activate
(check) $ python
Python 3.12.8 (main, Feb 24 2025, 16:15:20) [GCC 14.2.1 20241221] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from importlib.metadata import distribution
>>> dist = distribution('pyserv')
>>> dist.files
[PackagePath('../../../bin/atftpdaemon'), PackagePath('../../../bin/httpdaemon'), PackagePath('../../../bin/serv'), PackagePath('../../../bin/tftpd'), PackagePath('../../../bin/tftpdaemon'), PackagePath('../../../bin/wsgi'), PackagePath('pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/INSTALLER'), PackagePath('pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/METADATA'), PackagePath('pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/MIT.txt'), PackagePath('pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/RECORD'), PackagePath('pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/REQUESTED'), PackagePath('pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/WHEEL'), PackagePath('pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/entry_points.txt'), PackagePath('pyserv-1.7.1.dev2+g37322f6.d20250318.dist-info/top_level.txt'), PackagePath('pyserv/__init__.py'), PackagePath('pyserv/__pycache__/__init__.cpython-312.pyc'), PackagePath('pyserv/__pycache__/ext.cpython-312.pyc'), PackagePath('pyserv/__pycache__/server.cpython-312.pyc'), PackagePath('pyserv/__pycache__/settings.cpython-312.pyc'), PackagePath('pyserv/__pycache__/tftpd.cpython-312.pyc'), PackagePath('pyserv/__pycache__/wsgi.cpython-312.pyc'), PackagePath('pyserv/ext.py'), PackagePath('pyserv/server.py'), PackagePath('pyserv/settings.py'), PackagePath('pyserv/tftpd.py'), PackagePath('pyserv/wsgi.py')]
>>> 

@sarnold
Copy link
Author

sarnold commented Mar 18, 2025

I could be missing something obvious/not-so-obvious but this really feels like pkg_resources is just plain broken when using only pyproject.toml on 3.12+.

@pfmoore
Copy link
Member

pfmoore commented Mar 18, 2025

I tried this locally (Windows, Python 3.13). I ran the following commands:

tox -e build
py -m venv .venv
.\.venv\Scripts\pip.exe install --no-deps .\dist\pyserv-1.7.2.dev1+g7117a95-py3-none-any.whl
.\.venv\Scripts\pip.exe show -f pyserve.\.venv\Scripts\pip.exe show -f pyserve

I see the correct list of files, and location. Even if I omit --no-deps I see the correct data.

@SJLC
Copy link

SJLC commented Mar 18, 2025

I reproduced the problem with python-3.10.12 and pip-25.0.1 on ubuntu 22.04

check: commands[1]> python -m pip show -f pyserv
Name: pyserv
Version: 1.7.2.dev1+g7117a95
Summary: A collection of simple servers for HTTP, WSGI, and TFTP
Home-page: https://github.com/sarnold/pyserv
Author: Stephen Arnold
Author-email: [email protected]
License: MIT
Location: /tmp/pyserv/src
Requires: daemonizer, platformdirs, py3tftp, tftpy
Required-by: 
Files:
Cannot locate RECORD or installed-files.txt

@sarnold
Copy link
Author

sarnold commented Mar 19, 2025

3.13 on ubuntu 24.04

check: commands[1]> python -m pip show -f pyserv
Name: pyserv
Version: 1.7.2.dev1+g7117a95
Summary: A collection of simple servers for HTTP, WSGI, and TFTP
Home-page: https://github.com/sarnold/pyserv
Author: Stephen Arnold
Author-email: [email protected]
License: MIT
Location: /home/user/src/pyserv/src
Requires: daemonizer, platformdirs, py3tftp, tftpy
Required-by: 
Files:
Cannot locate RECORD or installed-files.txt
check: commands[2]> python -c 'import pyserv; print(pyserv.__description__)'
A collection of simple servers for HTTP, WSGI, and TFTP
check: commands[3]> python -c 'from pyserv.settings import show_uservars; show_uservars()'
Python version: 3.13.2 (main, Feb  5 2025, 01:23:35) [GCC 14.2.0]

@pfmoore
Copy link
Member

pfmoore commented Mar 19, 2025

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.

@SJLC
Copy link

SJLC commented Mar 19, 2025

@pfmoore mine is not system, it is in venv from which pip install --upgrade pip has been run

pip install --upgrade pip
Requirement already satisfied: pip in ./.tox/build/lib/python3.10/site-packages (25.0.1)

@ichard26 ichard26 added type: support User Support and removed type: bug A confirmed bug or unintended behavior S: needs triage Issues/PRs that need to be triaged labels Mar 19, 2025
@ichard26
Copy link
Member

@sarnold PYTHONPATH is being set to include your source directory which unfortunately includes a .egg-info directory AKA installation metadata (probably left behind from the setuptools invocation from the build environment) which convinces pip to treat pyserv as installed.

[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.

Installing collected packages: py3tftp, tftpy, platformdirs, daemonizer, pyserv
  Attempting uninstall: pyserv
    Found existing installation: pyserv 1.7.1.dev2+g37322f6.d20250318
    Not uninstalling pyserv at /home/user/src/python-servers/src, outside environment /home/user/src/python-servers/.tox/check
    Can't uninstall 'pyserv'. No files were found to uninstall.

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.

@sarnold
Copy link
Author

sarnold commented Mar 20, 2025

"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!

@ichard26
Copy link
Member

I'm glad to have helped!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: support User Support
Projects
None yet
Development

No branches or pull requests

4 participants