Skip to content

When package=wheel is set, the wheel doesn't have a WHEEL item #2870

@kurtmckee

Description

@kurtmckee

Issue

When running Tox with -vvv enabled, it appeared that Tox was creating a .tar.gz file, but in every environment, pip was outputting text that said it was creating a wheel from the .tar.gz file. I added the following to my tox.ini file, under the [testenv] section:

[testenv]
package = wheel
wheel_build_env = .pkg

However, I'm getting an error message that the .whl archive doesn't contain a WHEEL item:

ERROR: listparser has an invalid wheel, listparser has an invalid wheel, could not read 'listparser-0.19.dist-info/WHEEL' file: KeyError("There is no item named 'listparser-0.19.dist-info/WHEEL' in the archive")

When I run poetry build or pip wheel -w dist ., the resulting wheel contains a WHEEL item and is installable using Tox's --installpkg CLI option. However, the wheel that is generated in .pkg/dist/ by Tox using the above INI configuration does not have that WHEEL item.

Environment

Provide at least:

  • OS: Windows 10 Home [Version 10.0.19045.2486]
  • Python 3.11.1
  • Tox 4.3.1
  • pip list of the host Python where tox is installed (virtual environment activated):
Package              Version   Editable project location
-------------------- --------- --------------------------------------
attrs                22.1.0
CacheControl         0.12.11
cachetools           5.2.1
certifi              2022.12.7
cfgv                 3.3.1
chardet              5.1.0
charset-normalizer   2.1.1
cleo                 2.0.1
click                8.1.3
click-log            0.4.0
colorama             0.4.6
crashtest            0.4.1
distlib              0.3.6
dulwich              0.20.50
filelock             3.9.0
html5lib             1.1
identify             2.5.11
idna                 3.4
importlib-metadata   5.2.0
iniconfig            1.1.1
jaraco.classes       3.2.3
Jinja2               3.1.2
jsonschema           4.17.3
keyring              23.13.1
listparser           0.19      C:\Users\Kurt\Documents\dev\listparser
lockfile             0.12.2
MarkupSafe           2.1.1
more-itertools       9.0.0
msgpack              1.0.4
nodeenv              1.7.0
packaging            23.0
pexpect              4.8.0
pip                  22.3.1
pkginfo              1.9.2
platformdirs         2.6.2
pluggy               1.0.0
poetry               1.3.1
poetry-core          1.4.0
poetry-plugin-export 1.2.0
pre-commit           2.20.0
ptyprocess           0.7.0
pyproject_api        1.4.0
pyrsistent           0.19.2
pytest               7.2.0
pywin32-ctypes       0.2.0
PyYAML               6.0
rapidfuzz            2.13.6
requests             2.28.1
requests-toolbelt    0.10.1
scriv                1.0.0
setuptools           65.7.0
shellingham          1.5.0
six                  1.16.0
toml                 0.10.2
tomli                2.0.1
tomlkit              0.11.6
tox                  4.3.1
trove-classifiers    2022.12.1
urllib3              1.26.13
virtualenv           20.17.1
webencodings         0.5.1
wheel                0.38.4
zipp                 3.11.0

Output of running tox

Provide the output of tox -rvv py311:

.pkg: 452 W remove tox env folder C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg [tox\tox_env\api.py:321]
py311: 711 I find interpreter for spec PythonSpec(major=3, minor=11) [virtualenv\discovery\builtin.py:56]
py311: 713 D got python info of C:\Program Files\Python311\python.exe from C:\Users\Kurt\AppData\Local\pypa\virtualenv\py_info\1\76ad95f14593b0a2fc24d0a09d92258fca1e0075874122d58dd1bae94a601e54.json [virtualenv\app_data\via_disk_folder.py:129]
py311: 714 I proposed PythonInfo(spec=CPython3.11.1.final.0-64, system=C:\Program Files\Python311\python.exe, exe=C:\Users\Kurt\Documents\dev\listparser\.venv\Scripts\python.exe, platform=win32, version='3.11.1 (tags/v3.11.1:a7a450f, Dec  6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)]', encoding_fs_io=utf-8-cp1252) [virtualenv\discovery\builtin.py:63]
py311: 714 D accepted PythonInfo(spec=CPython3.11.1.final.0-64, system=C:\Program Files\Python311\python.exe, exe=C:\Users\Kurt\Documents\dev\listparser\.venv\Scripts\python.exe, platform=win32, version='3.11.1 (tags/v3.11.1:a7a450f, Dec  6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)]', encoding_fs_io=utf-8-cp1252) [virtualenv\discovery\builtin.py:65]
py311: 719 D symlink on filesystem does work [virtualenv\info.py:43]
py311: 720 D filesystem is not case-sensitive [virtualenv\info.py:24]
py311: 792 I create virtual environment via CPython3Windows(dest=C:\Users\Kurt\Documents\dev\listparser\.tox\py311, clear=False, no_vcs_ignore=False, global=False) [virtualenv\run\session.py:48]
py311: 792 D create folder C:\Users\Kurt\Documents\dev\listparser\.tox\py311\Lib\site-packages [virtualenv\util\path\_sync.py:9]
py311: 793 D create folder C:\Users\Kurt\Documents\dev\listparser\.tox\py311\Scripts [virtualenv\util\path\_sync.py:9]
py311: 793 D write C:\Users\Kurt\Documents\dev\listparser\.tox\py311\pyvenv.cfg [virtualenv\create\pyenv_cfg.py:30]
py311: 793 D    home = C:\Program Files\Python311 [virtualenv\create\pyenv_cfg.py:34]
py311: 793 D    implementation = CPython [virtualenv\create\pyenv_cfg.py:34]
py311: 793 D    version_info = 3.11.1.final.0 [virtualenv\create\pyenv_cfg.py:34]
py311: 794 D    virtualenv = 20.17.1 [virtualenv\create\pyenv_cfg.py:34]
py311: 794 D    include-system-site-packages = false [virtualenv\create\pyenv_cfg.py:34]
py311: 794 D    base-prefix = C:\Program Files\Python311 [virtualenv\create\pyenv_cfg.py:34]
py311: 794 D    base-exec-prefix = C:\Program Files\Python311 [virtualenv\create\pyenv_cfg.py:34]
py311: 794 D    base-executable = C:\Program Files\Python311\python.exe [virtualenv\create\pyenv_cfg.py:34]
py311: 795 D copy C:\Program Files\Python311\Lib\venv\scripts\nt\python.exe to C:\Users\Kurt\Documents\dev\listparser\.tox\py311\Scripts\python.exe [virtualenv\util\path\_sync.py:36]
py311: 797 D copy C:\Program Files\Python311\Lib\venv\scripts\nt\pythonw.exe to C:\Users\Kurt\Documents\dev\listparser\.tox\py311\Scripts\pythonw.exe [virtualenv\util\path\_sync.py:36]
py311: 798 D create virtualenv import hook file C:\Users\Kurt\Documents\dev\listparser\.tox\py311\Lib\site-packages\_virtualenv.pth [virtualenv\create\via_global_ref\api.py:89]
py311: 799 D create C:\Users\Kurt\Documents\dev\listparser\.tox\py311\Lib\site-packages\_virtualenv.py [virtualenv\create\via_global_ref\api.py:92]
py311: 800 D ============================== target debug ============================== [virtualenv\run\session.py:50]
py311: 801 D debug via 'C:\Users\Kurt\Documents\dev\listparser\.tox\py311\Scripts\python.exe' 'C:\Users\Kurt\Documents\dev\listparser\.venv\Lib\site-packages\virtualenv\create\debug.py' [virtualenv\create\creator.py:197]
py311: 801 D {
  "sys": {
    "executable": "C:\\Users\\Kurt\\Documents\\dev\\listparser\\.tox\\py311\\Scripts\\python.exe",
    "_base_executable": "C:\\Program Files\\Python311\\python.exe",
    "prefix": "C:\\Users\\Kurt\\Documents\\dev\\listparser\\.tox\\py311",
    "base_prefix": "C:\\Program Files\\Python311",
    "real_prefix": null,
    "exec_prefix": "C:\\Users\\Kurt\\Documents\\dev\\listparser\\.tox\\py311",
    "base_exec_prefix": "C:\\Program Files\\Python311",
    "path": [
      "C:\\Program Files\\Python311\\python311.zip",
      "C:\\Program Files\\Python311\\DLLs",
      "C:\\Program Files\\Python311\\Lib",
      "C:\\Program Files\\Python311",
      "C:\\Users\\Kurt\\Documents\\dev\\listparser\\.tox\\py311",
      "C:\\Users\\Kurt\\Documents\\dev\\listparser\\.tox\\py311\\Lib\\site-packages"
    ],
    "meta_path": [
      "<class '_virtualenv._Finder'>",
      "<class '_frozen_importlib.BuiltinImporter'>",
      "<class '_frozen_importlib.FrozenImporter'>",
      "<class '_frozen_importlib_external.PathFinder'>"
    ],
    "fs_encoding": "utf-8",
    "io_encoding": "cp1252"
  },
  "version": "3.11.1 (tags/v3.11.1:a7a450f, Dec  6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)]",
  "makefile_filename": "C:\\Program Files\\Python311\\Lib\\config\\Makefile",
  "os": "<module 'os' (frozen)>",
  "site": "<module 'site' (frozen)>",
  "datetime": "<module 'datetime' from 'C:\\\\Program Files\\\\Python311\\\\Lib\\\\datetime.py'>",
  "math": "<module 'math' (built-in)>",
  "json": "<module 'json' from 'C:\\\\Program Files\\\\Python311\\\\Lib\\\\json\\\\__init__.py'>"
} [virtualenv\run\session.py:51]
py311: 920 I add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\Kurt\AppData\Local\pypa\virtualenv) [virtualenv\run\session.py:55]
py311: 924 D got embed update of distribution pip from C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\embed\3\pip.json [virtualenv\app_data\via_disk_folder.py:129]
py311: 924 D got embed update of distribution setuptools from C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\embed\3\setuptools.json [virtualenv\app_data\via_disk_folder.py:129]
py311: 925 D got embed update of distribution wheel from C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\embed\3\wheel.json [virtualenv\app_data\via_disk_folder.py:129]
py311: 929 D install pip from wheel C:\Users\Kurt\Documents\dev\listparser\.venv\Lib\site-packages\virtualenv\seed\wheels\embed\pip-22.3.1-py3-none-any.whl via CopyPipInstall [virtualenv\seed\embed\via_app_data\via_app_data.py:47]
py311: 929 D install setuptools from wheel C:\Users\Kurt\Documents\dev\listparser\.venv\Lib\site-packages\virtualenv\seed\wheels\embed\setuptools-65.6.3-py3-none-any.whl via CopyPipInstall [virtualenv\seed\embed\via_app_data\via_app_data.py:47]
py311: 929 D install wheel from wheel C:\Users\Kurt\Documents\dev\listparser\.venv\Lib\site-packages\virtualenv\seed\wheels\embed\wheel-0.38.4-py3-none-any.whl via CopyPipInstall [virtualenv\seed\embed\via_app_data\via_app_data.py:47]
py311: 932 D copy directory C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\pip-22.3.1-py3-none-any\pip to C:\Users\Kurt\Documents\dev\listparser\.tox\py311\Lib\site-packages\pip [virtualenv\util\path\_sync.py:36]
py311: 933 D copy C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\setuptools-65.6.3-py3-none-any\distutils-precedence.pth to C:\Users\Kurt\Documents\dev\listparser\.tox\py311\Lib\site-packages\distutils-precedence.pth [virtualenv\util\path\_sync.py:36]
py311: 933 D copy directory C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\wheel-0.38.4-py3-none-any\wheel to C:\Users\Kurt\Documents\dev\listparser\.tox\py311\Lib\site-packages\wheel [virtualenv\util\path\_sync.py:36]
py311: 934 D copy directory C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\setuptools-65.6.3-py3-none-any\pkg_resources to C:\Users\Kurt\Documents\dev\listparser\.tox\py311\Lib\site-packages\pkg_resources [virtualenv\util\path\_sync.py:36]
py311: 959 D copy directory C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\wheel-0.38.4-py3-none-any\wheel-0.38.4.dist-info to C:\Users\Kurt\Documents\dev\listparser\.tox\py311\Lib\site-packages\wheel-0.38.4.dist-info [virtualenv\util\path\_sync.py:36]
py311: 971 D copy C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\wheel-0.38.4-py3-none-any\wheel-0.38.4.virtualenv to C:\Users\Kurt\Documents\dev\listparser\.tox\py311\Lib\site-packages\wheel-0.38.4.virtualenv [virtualenv\util\path\_sync.py:36]
py311: 979 D generated console scripts wheel-3.11.exe wheel3.11.exe wheel3.exe wheel.exe [virtualenv\seed\embed\via_app_data\pip_install\base.py:41]
py311: 999 D copy directory C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\setuptools-65.6.3-py3-none-any\setuptools to C:\Users\Kurt\Documents\dev\listparser\.tox\py311\Lib\site-packages\setuptools [virtualenv\util\path\_sync.py:36]
py311: 1190 D copy directory C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\setuptools-65.6.3-py3-none-any\setuptools-65.6.3.dist-info to C:\Users\Kurt\Documents\dev\listparser\.tox\py311\Lib\site-packages\setuptools-65.6.3.dist-info [virtualenv\util\path\_sync.py:36]
py311: 1197 D copy C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\setuptools-65.6.3-py3-none-any\setuptools-65.6.3.virtualenv to C:\Users\Kurt\Documents\dev\listparser\.tox\py311\Lib\site-packages\setuptools-65.6.3.virtualenv [virtualenv\util\path\_sync.py:36]
py311: 1199 D copy directory C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\setuptools-65.6.3-py3-none-any\_distutils_hack to C:\Users\Kurt\Documents\dev\listparser\.tox\py311\Lib\site-packages\_distutils_hack [virtualenv\util\path\_sync.py:36]
py311: 1202 D generated console scripts  [virtualenv\seed\embed\via_app_data\pip_install\base.py:41]
py311: 1420 D copy directory C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\pip-22.3.1-py3-none-any\pip-22.3.1.dist-info to C:\Users\Kurt\Documents\dev\listparser\.tox\py311\Lib\site-packages\pip-22.3.1.dist-info [virtualenv\util\path\_sync.py:36]
py311: 1427 D copy C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\pip-22.3.1-py3-none-any\pip-22.3.1.virtualenv to C:\Users\Kurt\Documents\dev\listparser\.tox\py311\Lib\site-packages\pip-22.3.1.virtualenv [virtualenv\util\path\_sync.py:36]
py311: 1431 D generated console scripts pip-3.11.exe pip3.exe pip3.11.exe pip.exe [virtualenv\seed\embed\via_app_data\pip_install\base.py:41]
py311: 1432 I add activators for Bash, Batch, Fish, Nushell, PowerShell, Python [virtualenv\run\session.py:61]
py311: 1441 D write C:\Users\Kurt\Documents\dev\listparser\.tox\py311\pyvenv.cfg [virtualenv\create\pyenv_cfg.py:30]
py311: 1441 D   home = C:\Program Files\Python311 [virtualenv\create\pyenv_cfg.py:34]
py311: 1441 D   implementation = CPython [virtualenv\create\pyenv_cfg.py:34]
py311: 1441 D   version_info = 3.11.1.final.0 [virtualenv\create\pyenv_cfg.py:34]
py311: 1441 D   virtualenv = 20.17.1 [virtualenv\create\pyenv_cfg.py:34]
py311: 1442 D   include-system-site-packages = false [virtualenv\create\pyenv_cfg.py:34]
py311: 1442 D   base-prefix = C:\Program Files\Python311 [virtualenv\create\pyenv_cfg.py:34]
py311: 1442 D   base-exec-prefix = C:\Program Files\Python311 [virtualenv\create\pyenv_cfg.py:34]
py311: 1442 D   base-executable = C:\Program Files\Python311\python.exe [virtualenv\create\pyenv_cfg.py:34]
py311: 1451 W install_deps> python -I -m pip install coverage[toml] pytest pytest-randomly [tox\tox_env\api.py:427]
Collecting coverage[toml]
  Using cached coverage-7.0.5-cp311-cp311-win_amd64.whl (201 kB)
Collecting pytest
  Using cached pytest-7.2.1-py3-none-any.whl (317 kB)
Collecting pytest-randomly
  Using cached pytest_randomly-3.12.0-py3-none-any.whl (8.5 kB)
Collecting attrs>=19.2.0
  Using cached attrs-22.2.0-py3-none-any.whl (60 kB)
Collecting iniconfig
  Using cached iniconfig-2.0.0-py3-none-any.whl (5.9 kB)
Collecting packaging
  Using cached packaging-23.0-py3-none-any.whl (42 kB)
Collecting pluggy<2.0,>=0.12
  Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting colorama
  Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Installing collected packages: pluggy, packaging, iniconfig, coverage, colorama, attrs, pytest, pytest-randomly
Successfully installed attrs-22.2.0 colorama-0.4.6 coverage-7.0.5 iniconfig-2.0.0 packaging-23.0 pluggy-1.0.0 pytest-7.2.1 pytest-randomly-3.12.0
py311: 8238 I exit 0 (6.80 seconds) C:\Users\Kurt\Documents\dev\listparser> python -I -m pip install coverage[toml] pytest pytest-randomly pid=6308 [tox\execute\api.py:275]
.pkg: 8244 I find interpreter for spec PythonSpec(path=C:\Users\Kurt\Documents\dev\listparser\.venv\Scripts\python.exe) [virtualenv\discovery\builtin.py:56]
.pkg: 8245 I proposed PythonInfo(spec=CPython3.11.1.final.0-64, system=C:\Program Files\Python311\python.exe, exe=C:\Users\Kurt\Documents\dev\listparser\.venv\Scripts\python.exe, platform=win32, version='3.11.1 (tags/v3.11.1:a7a450f, Dec  6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)]', encoding_fs_io=utf-8-cp1252) [virtualenv\discovery\builtin.py:63]
.pkg: 8245 D accepted PythonInfo(spec=CPython3.11.1.final.0-64, system=C:\Program Files\Python311\python.exe, exe=C:\Users\Kurt\Documents\dev\listparser\.venv\Scripts\python.exe, platform=win32, version='3.11.1 (tags/v3.11.1:a7a450f, Dec  6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)]', encoding_fs_io=utf-8-cp1252) [virtualenv\discovery\builtin.py:65]
.pkg: 8252 I create virtual environment via CPython3Windows(dest=C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg, clear=False, no_vcs_ignore=False, global=False) [virtualenv\run\session.py:48]
.pkg: 8253 D create folder C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\Lib\site-packages [virtualenv\util\path\_sync.py:9]
.pkg: 8254 D create folder C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\Scripts [virtualenv\util\path\_sync.py:9]
.pkg: 8255 D write C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\pyvenv.cfg [virtualenv\create\pyenv_cfg.py:30]
.pkg: 8255 D    home = C:\Program Files\Python311 [virtualenv\create\pyenv_cfg.py:34]
.pkg: 8255 D    implementation = CPython [virtualenv\create\pyenv_cfg.py:34]
.pkg: 8256 D    version_info = 3.11.1.final.0 [virtualenv\create\pyenv_cfg.py:34]
.pkg: 8256 D    virtualenv = 20.17.1 [virtualenv\create\pyenv_cfg.py:34]
.pkg: 8256 D    include-system-site-packages = false [virtualenv\create\pyenv_cfg.py:34]
.pkg: 8256 D    base-prefix = C:\Program Files\Python311 [virtualenv\create\pyenv_cfg.py:34]
.pkg: 8257 D    base-exec-prefix = C:\Program Files\Python311 [virtualenv\create\pyenv_cfg.py:34]
.pkg: 8257 D    base-executable = C:\Program Files\Python311\python.exe [virtualenv\create\pyenv_cfg.py:34]
.pkg: 8258 D copy C:\Program Files\Python311\Lib\venv\scripts\nt\python.exe to C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\Scripts\python.exe [virtualenv\util\path\_sync.py:36]
.pkg: 8259 D copy C:\Program Files\Python311\Lib\venv\scripts\nt\pythonw.exe to C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\Scripts\pythonw.exe [virtualenv\util\path\_sync.py:36]
.pkg: 8261 D create virtualenv import hook file C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\Lib\site-packages\_virtualenv.pth [virtualenv\create\via_global_ref\api.py:89]
.pkg: 8262 D create C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\Lib\site-packages\_virtualenv.py [virtualenv\create\via_global_ref\api.py:92]
.pkg: 8265 D ============================== target debug ============================== [virtualenv\run\session.py:50]
.pkg: 8266 D debug via 'C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\Scripts\python.exe' 'C:\Users\Kurt\Documents\dev\listparser\.venv\Lib\site-packages\virtualenv\create\debug.py' [virtualenv\create\creator.py:197]
.pkg: 8265 D {
  "sys": {
    "executable": "C:\\Users\\Kurt\\Documents\\dev\\listparser\\.tox\\.pkg\\Scripts\\python.exe",
    "_base_executable": "C:\\Program Files\\Python311\\python.exe",
    "prefix": "C:\\Users\\Kurt\\Documents\\dev\\listparser\\.tox\\.pkg",
    "base_prefix": "C:\\Program Files\\Python311",
    "real_prefix": null,
    "exec_prefix": "C:\\Users\\Kurt\\Documents\\dev\\listparser\\.tox\\.pkg",
    "base_exec_prefix": "C:\\Program Files\\Python311",
    "path": [
      "C:\\Program Files\\Python311\\python311.zip",
      "C:\\Program Files\\Python311\\DLLs",
      "C:\\Program Files\\Python311\\Lib",
      "C:\\Program Files\\Python311",
      "C:\\Users\\Kurt\\Documents\\dev\\listparser\\.tox\\.pkg",
      "C:\\Users\\Kurt\\Documents\\dev\\listparser\\.tox\\.pkg\\Lib\\site-packages"
    ],
    "meta_path": [
      "<class '_virtualenv._Finder'>",
      "<class '_frozen_importlib.BuiltinImporter'>",
      "<class '_frozen_importlib.FrozenImporter'>",
      "<class '_frozen_importlib_external.PathFinder'>"
    ],
    "fs_encoding": "utf-8",
    "io_encoding": "cp1252"
  },
  "version": "3.11.1 (tags/v3.11.1:a7a450f, Dec  6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)]",
  "makefile_filename": "C:\\Program Files\\Python311\\Lib\\config\\Makefile",
  "os": "<module 'os' (frozen)>",
  "site": "<module 'site' (frozen)>",
  "datetime": "<module 'datetime' from 'C:\\\\Program Files\\\\Python311\\\\Lib\\\\datetime.py'>",
  "math": "<module 'math' (built-in)>",
  "json": "<module 'json' from 'C:\\\\Program Files\\\\Python311\\\\Lib\\\\json\\\\__init__.py'>"
} [virtualenv\run\session.py:51]
.pkg: 8399 I add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\Kurt\AppData\Local\pypa\virtualenv) [virtualenv\run\session.py:55]
.pkg: 8404 D got embed update of distribution setuptools from C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\embed\3\setuptools.json [virtualenv\app_data\via_disk_folder.py:129]
.pkg: 8404 D got embed update of distribution pip from C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\embed\3\pip.json [virtualenv\app_data\via_disk_folder.py:129]
.pkg: 8404 D got embed update of distribution wheel from C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\embed\3\wheel.json [virtualenv\app_data\via_disk_folder.py:129]
.pkg: 8406 D install setuptools from wheel C:\Users\Kurt\Documents\dev\listparser\.venv\Lib\site-packages\virtualenv\seed\wheels\embed\setuptools-65.6.3-py3-none-any.whl via CopyPipInstall [virtualenv\seed\embed\via_app_data\via_app_data.py:47]
.pkg: 8406 D install pip from wheel C:\Users\Kurt\Documents\dev\listparser\.venv\Lib\site-packages\virtualenv\seed\wheels\embed\pip-22.3.1-py3-none-any.whl via CopyPipInstall [virtualenv\seed\embed\via_app_data\via_app_data.py:47]
.pkg: 8406 D install wheel from wheel C:\Users\Kurt\Documents\dev\listparser\.venv\Lib\site-packages\virtualenv\seed\wheels\embed\wheel-0.38.4-py3-none-any.whl via CopyPipInstall [virtualenv\seed\embed\via_app_data\via_app_data.py:47]
.pkg: 8409 D copy directory C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\pip-22.3.1-py3-none-any\pip to C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\Lib\site-packages\pip [virtualenv\util\path\_sync.py:36]
.pkg: 8410 D copy C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\setuptools-65.6.3-py3-none-any\distutils-precedence.pth to C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\Lib\site-packages\distutils-precedence.pth [virtualenv\util\path\_sync.py:36]
.pkg: 8410 D copy directory C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\wheel-0.38.4-py3-none-any\wheel to C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\Lib\site-packages\wheel [virtualenv\util\path\_sync.py:36]
.pkg: 8412 D copy directory C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\setuptools-65.6.3-py3-none-any\pkg_resources to C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\Lib\site-packages\pkg_resources [virtualenv\util\path\_sync.py:36]
.pkg: 8436 D copy directory C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\wheel-0.38.4-py3-none-any\wheel-0.38.4.dist-info to C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\Lib\site-packages\wheel-0.38.4.dist-info [virtualenv\util\path\_sync.py:36]
.pkg: 8447 D copy C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\wheel-0.38.4-py3-none-any\wheel-0.38.4.virtualenv to C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\Lib\site-packages\wheel-0.38.4.virtualenv [virtualenv\util\path\_sync.py:36]
.pkg: 8453 D generated console scripts wheel.exe wheel-3.11.exe wheel3.11.exe wheel3.exe [virtualenv\seed\embed\via_app_data\pip_install\base.py:41]
.pkg: 8476 D copy directory C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\setuptools-65.6.3-py3-none-any\setuptools to C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\Lib\site-packages\setuptools [virtualenv\util\path\_sync.py:36]
.pkg: 8664 D copy directory C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\setuptools-65.6.3-py3-none-any\setuptools-65.6.3.dist-info to C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\Lib\site-packages\setuptools-65.6.3.dist-info [virtualenv\util\path\_sync.py:36]
.pkg: 8671 D copy C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\setuptools-65.6.3-py3-none-any\setuptools-65.6.3.virtualenv to C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\Lib\site-packages\setuptools-65.6.3.virtualenv [virtualenv\util\path\_sync.py:36]
.pkg: 8673 D copy directory C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\setuptools-65.6.3-py3-none-any\_distutils_hack to C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\Lib\site-packages\_distutils_hack [virtualenv\util\path\_sync.py:36]
.pkg: 8676 D generated console scripts  [virtualenv\seed\embed\via_app_data\pip_install\base.py:41]
.pkg: 8907 D copy directory C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\pip-22.3.1-py3-none-any\pip-22.3.1.dist-info to C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\Lib\site-packages\pip-22.3.1.dist-info [virtualenv\util\path\_sync.py:36]
.pkg: 8913 D copy C:\Users\Kurt\AppData\Local\pypa\virtualenv\wheel\3.11\image\1\CopyPipInstall\pip-22.3.1-py3-none-any\pip-22.3.1.virtualenv to C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\Lib\site-packages\pip-22.3.1.virtualenv [virtualenv\util\path\_sync.py:36]
.pkg: 8917 D generated console scripts pip.exe pip-3.11.exe pip3.exe pip3.11.exe [virtualenv\seed\embed\via_app_data\pip_install\base.py:41]
.pkg: 8918 I add activators for Bash, Batch, Fish, Nushell, PowerShell, Python [virtualenv\run\session.py:61]
.pkg: 8926 D write C:\Users\Kurt\Documents\dev\listparser\.tox\.pkg\pyvenv.cfg [virtualenv\create\pyenv_cfg.py:30]
.pkg: 8926 D    home = C:\Program Files\Python311 [virtualenv\create\pyenv_cfg.py:34]
.pkg: 8927 D    implementation = CPython [virtualenv\create\pyenv_cfg.py:34]
.pkg: 8927 D    version_info = 3.11.1.final.0 [virtualenv\create\pyenv_cfg.py:34]
.pkg: 8927 D    virtualenv = 20.17.1 [virtualenv\create\pyenv_cfg.py:34]
.pkg: 8927 D    include-system-site-packages = false [virtualenv\create\pyenv_cfg.py:34]
.pkg: 8927 D    base-prefix = C:\Program Files\Python311 [virtualenv\create\pyenv_cfg.py:34]
.pkg: 8927 D    base-exec-prefix = C:\Program Files\Python311 [virtualenv\create\pyenv_cfg.py:34]
.pkg: 8927 D    base-executable = C:\Program Files\Python311\python.exe [virtualenv\create\pyenv_cfg.py:34]
.pkg: 8934 W install_requires> python -I -m pip install poetry-core>=1.0.0 [tox\tox_env\api.py:427]
Collecting poetry-core>=1.0.0
  Using cached poetry_core-1.4.0-py3-none-any.whl (546 kB)
Installing collected packages: poetry-core
Successfully installed poetry-core-1.4.0
.pkg: 15150 I exit 0 (6.22 seconds) C:\Users\Kurt\Documents\dev\listparser> python -I -m pip install poetry-core>=1.0.0 pid=1336 [tox\execute\api.py:275]
.pkg: 15156 W _optional_hooks> python C:\Users\Kurt\Documents\dev\listparser\.venv\Lib\site-packages\pyproject_api\_backend.py True poetry.core.masonry.api [tox\tox_env\api.py:427]
Backend: run command _optional_hooks with args {}
Backend: Wrote response {'return': {'get_requires_for_build_sdist': True, 'prepare_metadata_for_build_wheel': True, 'get_requires_for_build_wheel': True, 'build_editable': True, 'get_requires_for_build_editable': True, 'prepare_metadata_for_build_editable': True}} to C:\Users\Kurt\AppData\Local\Temp\pep517__optional_hooks-lapjd1_x.json
.pkg: 15549 I exit None (0.39 seconds) C:\Users\Kurt\Documents\dev\listparser> python C:\Users\Kurt\Documents\dev\listparser\.venv\Lib\site-packages\pyproject_api\_backend.py True poetry.core.masonry.api pid=3284 [tox\execute\api.py:275]
.pkg: 15560 W get_requires_for_build_wheel> python C:\Users\Kurt\Documents\dev\listparser\.venv\Lib\site-packages\pyproject_api\_backend.py True poetry.core.masonry.api [tox\tox_env\api.py:427]
Backend: run command get_requires_for_build_wheel with args {'config_settings': None}
Backend: Wrote response {'return': []} to C:\Users\Kurt\AppData\Local\Temp\pep517_get_requires_for_build_wheel-i4g_8das.json
.pkg: 15573 I exit None (0.02 seconds) C:\Users\Kurt\Documents\dev\listparser> python C:\Users\Kurt\Documents\dev\listparser\.venv\Lib\site-packages\pyproject_api\_backend.py True poetry.core.masonry.api pid=3284 [tox\execute\api.py:275]
.pkg: 15590 W build_wheel> python C:\Users\Kurt\Documents\dev\listparser\.venv\Lib\site-packages\pyproject_api\_backend.py True poetry.core.masonry.api [tox\tox_env\api.py:427]
The system cannot find the path specified.
Backend: run command build_wheel with args {'wheel_directory': 'C:\\Users\\Kurt\\Documents\\dev\\listparser\\.tox\\.pkg\\dist', 'config_settings': {'--build-option': []}, 'metadata_directory': 'C:\\Users\\Kurt\\Documents\\dev\\listparser\\.tox\\.pkg\\.meta'}
Backend: Wrote response {'return': 'listparser-0.19-py3-none-any.whl'} to C:\Users\Kurt\AppData\Local\Temp\pep517_build_wheel-fv7f1gjk.json
.pkg: 16258 I exit None (0.67 seconds) C:\Users\Kurt\Documents\dev\listparser> python C:\Users\Kurt\Documents\dev\listparser\.venv\Lib\site-packages\pyproject_api\_backend.py True poetry.core.masonry.api pid=3284 [tox\execute\api.py:275]
.pkg: 16278 D package .tmp\package\4\listparser-0.19-py3-none-any.whl links to .pkg\dist\listparser-0.19-py3-none-any.whl (C:\Users\Kurt\Documents\dev\listparser\.tox) [tox\util\file_view.py:36]
py311: 16291 W install_package> python -I -m pip install --force-reinstall --no-deps C:\Users\Kurt\Documents\dev\listparser\.tox\.tmp\package\4\listparser-0.19-py3-none-any.whl [tox\tox_env\api.py:427]
Processing c:\users\kurt\documents\dev\listparser\.tox\.tmp\package\4\listparser-0.19-py3-none-any.whl
ERROR: listparser has an invalid wheel, listparser has an invalid wheel, could not read 'listparser-0.19.dist-info/WHEEL' file: KeyError("There is no item named 'listparser-0.19.dist-info/WHEEL' in the archive")
py311: 17352 C exit 1 (1.06 seconds) C:\Users\Kurt\Documents\dev\listparser> python -I -m pip install --force-reinstall --no-deps C:\Users\Kurt\Documents\dev\listparser\.tox\.tmp\package\4\listparser-0.19-py3-none-any.whl pid=14116 [tox\execute\api.py:275]
.pkg: 17354 W _exit> python C:\Users\Kurt\Documents\dev\listparser\.venv\Lib\site-packages\pyproject_api\_backend.py True poetry.core.masonry.api [tox\tox_env\api.py:427]
Backend: run command _exit with args {}
Backend: Wrote response {'return': 0} to C:\Users\Kurt\AppData\Local\Temp\pep517__exit-1694g1x0.json
.pkg: 17358 I exit None (0.00 seconds) C:\Users\Kurt\Documents\dev\listparser> python C:\Users\Kurt\Documents\dev\listparser\.venv\Lib\site-packages\pyproject_api\_backend.py True poetry.core.masonry.api pid=3284 [tox\execute\api.py:275]
.pkg: 17388 D delete package C:\Users\Kurt\Documents\dev\listparser\.tox\.tmp\package\4\listparser-0.19-py3-none-any.whl [tox\tox_env\python\virtual_env\package\pyproject.py:171]
  py311: FAIL code 1 (16.94 seconds)
  evaluation failed :( (17.11 seconds)

NOTE:

In the output above, there is an error (search for .pkg: 15590 W build_wheel> above):

.pkg: 15590 W build_wheel> python C:\Users\Kurt\Documents\dev\listparser\.venv\Lib\site-packages\pyproject_api\_backend.py True poetry.core.masonry.api [tox\tox_env\api.py:427]
The system cannot find the path specified.

That error appears before and after I change tox.ini. It may be related but I wanted to point out that the error is present before and after I change tox.ini.

Minimal example

If possible, provide a minimal reproducer for the issue:

You can clone the repo I'm working on (I tested these instructions on Windows in a new directory; they are copy-pasteable):

git clone git@github.com:kurtmckee/listparser.git
cd listparser
python -m venv .venv
.venv/Scripts/Activate.ps1
pip install --upgrade pip setuptools wheel
pip install poetry
poetry install

You can verify that the tests currently run successfully by running tox -rvvve py311, then make the following change to tox.ini:

diff --git a/tox.ini b/tox.ini
index 7f311ef..d6eb860 100644
--- a/tox.ini
+++ b/tox.ini
@@ -14,6 +14,10 @@ isolated_build = True


 [testenv]
+# Instruct Tox to build a wheel exactly once.
+package = wheel
+wheel_build_env = .pkg
+
 deps =
     !ci: coverage[toml]
     pytest

On my machine, this results in an invalid wheel, and the error messages above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions