Skip to content
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

tox does not create valid editable wheel #2880

Closed
warsaw opened this issue Jan 17, 2023 · 11 comments · Fixed by #2881
Closed

tox does not create valid editable wheel #2880

warsaw opened this issue Jan 17, 2023 · 11 comments · Fixed by #2881

Comments

@warsaw
Copy link

warsaw commented Jan 17, 2023

Issue

I reported this bug previously against the pdm project, but now I think this is a regression or change in tox v4. Most of the following is copied from there.

I had several packages which are built and uploaded using tox + pdm. One example is flufl.lock. I recently received a bug report about the documentation not building on Debian so I started to investigate the problem.

The first step is to build from main as it is to ensure that it's still locally build and testable. Unfortunately, it's not! The build now fails locally on macOS.

% tox -e py311
.pkg: install_requires> python -I -m pip install pdm-pep517
.pkg: _optional_hooks> python /usr/local/Cellar/tox/4.2.8/libexec/lib/python3.11/site-packages/pyproject_api/_backend.py True pdm.pep517.api
.pkg: get_requires_for_build_editable> python /usr/local/Cellar/tox/4.2.8/libexec/lib/python3.11/site-packages/pyproject_api/_backend.py True pdm.pep517.api
.pkg: build_editable> python /usr/local/Cellar/tox/4.2.8/libexec/lib/python3.11/site-packages/pyproject_api/_backend.py True pdm.pep517.api
py311: install_package_deps> python -I -m pip install 'atpublic>=2.3' 'psutil>=5.9.0' 'typing_extensions; python_version < "3.8"'
py311: install_package> python -I -m pip install --force-reinstall --no-deps /Users/barry/projects/flufl/lock/.tox/.tmp/package/1/flufl.lock-7.1.2-py3-none-any.whl
Processing ./.tox/.tmp/package/1/flufl.lock-7.1.2-py3-none-any.whl
ERROR: flufl-lock has an invalid wheel, flufl-lock has an invalid wheel, could not read 'flufl.lock-7.1.2.dist-info/WHEEL' file: KeyError("There is no item named 'flufl.lock-7.1.2.dist-info/WHEEL' in the archive")

py311: exit 1 (0.56 seconds) /Users/barry/projects/flufl/lock> python -I -m pip install --force-reinstall --no-deps /Users/barry/projects/flufl/lock/.tox/.tmp/package/1/flufl.lock-7.1.2-py3-none-any.whl pid=25523
.pkg: _exit> python /usr/local/Cellar/tox/4.2.8/libexec/lib/python3.11/site-packages/pyproject_api/_backend.py True pdm.pep517.api
  py311: FAIL code 1 (5.15 seconds)
  evaluation failed :( (5.30 seconds)

Indeed it looks like the editable wheel is broken:

% unzip -l ./.tox/.pkg/dist/flufl.lock-7.1.2-py3-none-any.whl
Archive:  ./.tox/.pkg/dist/flufl.lock-7.1.2-py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
       36  01-01-2016 00:00   flufl.lock.pth
      105  01-01-2016 00:00   flufl.lock-7.1.2.dist-info/RECORD
---------                     -------
      141                     2 files

The .pth file in that wheel looks right, in that it contains the path to my src directory.

Clearly something that had been working before is no longer working, but I'm not sure where the bug is.

Steps to reproduce

$ git clone https://gitlab.com/warsaw/flufl.lock.git
$ cd flufl.lock
$ tox run -e py311

I suggest just running the py311 environment to see the failure.

To further investigate, I installed tox<4 in a venv and ran the same command as above, and that worked fine. I looked through the various upgrading to tox 4 recommendations and couldn't find anything that helped. I did try package = editable-legacy even though pdm supports PEP 660, but that didn't help.

Note too that pdm build does create a valid wheel:

% pdm build
Building sdist...
python.use_venv is on, creating a virtualenv for this project...
Virtualenv is created successfully at /Users/barry/projects/flufl/lock/.venv
Built sdist at /Users/barry/projects/flufl/lock/dist/flufl.lock-7.1.2.tar.gz
Building wheel...
Built wheel at /Users/barry/projects/flufl/lock/dist/flufl.lock-7.1.2-py3-none-any.whl
% unzip -l dist/flufl.lock-7.1.2-py3-none-any.whl 
Archive:  dist/flufl.lock-7.1.2-py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
      453  01-01-2016 00:00   flufl/lock/__init__.py
    25499  01-01-2016 00:00   flufl/lock/_lockfile.py
        0  01-01-2016 00:00   flufl/lock/py.typed
       87  01-01-2016 00:00   flufl.lock-7.1.2.dist-info/WHEEL
     3346  01-01-2016 00:00   flufl.lock-7.1.2.dist-info/METADATA
      558  01-01-2016 00:00   flufl.lock-7.1.2.dist-info/licenses/LICENSE
      546  01-01-2016 00:00   flufl.lock-7.1.2.dist-info/RECORD
---------                     -------
    30489                     7 files

Environment

Provide at least:

  • OS: macOS 13.1
  • pip list of the host Python where tox is installed: n/a

Note that tox 4.3.3 is installed via Homebrew

Output of running tox

Provide the output of tox -rvv:

% tox -rvv -e py311 # for brevity
.pkg: 235 I find interpreter for spec PythonSpec(major=3, minor=11) [virtualenv/discovery/builtin.py:56]
.pkg: 236 D got python info of /usr/local/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/bin/python3.11 from /Users/barry/Library/Application Support/virtualenv/py_info/1/0714c6668962eca66a7c8473ce9c7601fb874b657d823bcf3226cb35ecf3f9a6.json [virtualenv/app_data/via_disk_folder.py:129]
.pkg: 238 D got python info of /usr/local/opt/python@3.11/bin/python3.11 from /Users/barry/Library/Application Support/virtualenv/py_info/1/2d4e9b9c84dab3e1662173f95b81bd7f8a551068d04f5f3c42d164db7312a928.json [virtualenv/app_data/via_disk_folder.py:129]
.pkg: 239 I proposed PythonInfo(spec=CPython3.11.1.final.0-64, system=/usr/local/opt/python@3.11/bin/python3.11, exe=/usr/local/Cellar/tox/4.3.3/libexec/bin/python3.11, platform=darwin, version='3.11.1 (main, Dec 23 2022, 09:39:26) [Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:63]
.pkg: 239 D accepted PythonInfo(spec=CPython3.11.1.final.0-64, system=/usr/local/opt/python@3.11/bin/python3.11, exe=/usr/local/Cellar/tox/4.3.3/libexec/bin/python3.11, platform=darwin, version='3.11.1 (main, Dec 23 2022, 09:39:26) [Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:65]
.pkg: 266 D filesystem is not case-sensitive [virtualenv/info.py:24]
.pkg: 310 I find interpreter for spec PythonSpec(path=/usr/local/Cellar/tox/4.3.3/libexec/bin/python3.11) [virtualenv/discovery/builtin.py:56]
.pkg: 310 I proposed PythonInfo(spec=CPython3.11.1.final.0-64, system=/usr/local/opt/python@3.11/bin/python3.11, exe=/usr/local/Cellar/tox/4.3.3/libexec/bin/python3.11, platform=darwin, version='3.11.1 (main, Dec 23 2022, 09:39:26) [Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:63]
.pkg: 310 D accepted PythonInfo(spec=CPython3.11.1.final.0-64, system=/usr/local/opt/python@3.11/bin/python3.11, exe=/usr/local/Cellar/tox/4.3.3/libexec/bin/python3.11, platform=darwin, version='3.11.1 (main, Dec 23 2022, 09:39:26) [Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:65]
.pkg: 314 I find interpreter for spec PythonSpec(major=3, minor=7) [virtualenv/discovery/builtin.py:56]
.pkg: 314 I proposed PythonInfo(spec=CPython3.11.1.final.0-64, system=/usr/local/opt/python@3.11/bin/python3.11, exe=/usr/local/Cellar/tox/4.3.3/libexec/bin/python3.11, platform=darwin, version='3.11.1 (main, Dec 23 2022, 09:39:26) [Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:63]
.pkg: 322 D discover PATH[0]=/usr/local/bin [virtualenv/discovery/builtin.py:108]
.pkg: 323 D got python info of /usr/local/bin/python3.7 from /Users/barry/Library/Application Support/virtualenv/py_info/1/e774977668b7c0ae8309835a5187aa7fbf7669e7d0bb59755bc63e573643edcd.json [virtualenv/app_data/via_disk_folder.py:129]
.pkg: 325 D got python info of /usr/local/opt/python@3.7/bin/python3.7 from /Users/barry/Library/Application Support/virtualenv/py_info/1/407910dc9194d5420ce0f0143fecb83fef8c348660603d21cda0898c7dd6e099.json [virtualenv/app_data/via_disk_folder.py:129]
.pkg: 325 I proposed PathPythonInfo(spec=CPython3.7.16.final.0-64, system=/usr/local/opt/python@3.7/bin/python3.7, exe=/usr/local/bin/python3.7, platform=darwin, version='3.7.16 (default, Dec  7 2022, 01:34:15) \n[Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-UTF-8) [virtualenv/discovery/builtin.py:63]
.pkg: 359 D accepted PathPythonInfo(spec=CPython3.7.16.final.0-64, system=/usr/local/opt/python@3.7/bin/python3.7, exe=/usr/local/bin/python3.7, platform=darwin, version='3.7.16 (default, Dec  7 2022, 01:34:15) \n[Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-UTF-8) [virtualenv/discovery/builtin.py:65]
.pkg: 366 I find interpreter for spec PythonSpec(major=3, minor=8) [virtualenv/discovery/builtin.py:56]
.pkg: 366 I proposed PythonInfo(spec=CPython3.11.1.final.0-64, system=/usr/local/opt/python@3.11/bin/python3.11, exe=/usr/local/Cellar/tox/4.3.3/libexec/bin/python3.11, platform=darwin, version='3.11.1 (main, Dec 23 2022, 09:39:26) [Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:63]
.pkg: 366 D discover PATH[0]=/usr/local/bin [virtualenv/discovery/builtin.py:108]
.pkg: 367 D got python info of /usr/local/bin/python3.8 from /Users/barry/Library/Application Support/virtualenv/py_info/1/0adcc2737ebf6a4a119f135174df96668767fca1ef1112612db5ecadf2b6d608.json [virtualenv/app_data/via_disk_folder.py:129]
.pkg: 395 D got python info of /usr/local/opt/python@3.8/bin/python3.8 from /Users/barry/Library/Application Support/virtualenv/py_info/1/1ee38ef4a5a9feb55287fd749643f13d043cb0a7addaab2a9c224cbe137c0062.json [virtualenv/app_data/via_disk_folder.py:129]
.pkg: 396 I proposed PathPythonInfo(spec=CPython3.8.16.final.0-64, system=/usr/local/opt/python@3.8/bin/python3.8, exe=/usr/local/bin/python3.8, platform=darwin, version='3.8.16 (default, Dec  7 2022, 01:36:11) \n[Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:63]
.pkg: 396 D accepted PathPythonInfo(spec=CPython3.8.16.final.0-64, system=/usr/local/opt/python@3.8/bin/python3.8, exe=/usr/local/bin/python3.8, platform=darwin, version='3.8.16 (default, Dec  7 2022, 01:36:11) \n[Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:65]
.pkg: 441 I find interpreter for spec PythonSpec(major=3, minor=9) [virtualenv/discovery/builtin.py:56]
.pkg: 441 I proposed PythonInfo(spec=CPython3.11.1.final.0-64, system=/usr/local/opt/python@3.11/bin/python3.11, exe=/usr/local/Cellar/tox/4.3.3/libexec/bin/python3.11, platform=darwin, version='3.11.1 (main, Dec 23 2022, 09:39:26) [Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:63]
.pkg: 441 D discover PATH[0]=/usr/local/bin [virtualenv/discovery/builtin.py:108]
.pkg: 442 D got python info of /usr/local/bin/python3.9 from /Users/barry/Library/Application Support/virtualenv/py_info/1/397704579725e15f5c7cb49fe5f0341eb7531c82d19f2c29d197e8b64ab5776b.json [virtualenv/app_data/via_disk_folder.py:129]
.pkg: 443 D got python info of /usr/local/opt/python@3.9/bin/python3.9 from /Users/barry/Library/Application Support/virtualenv/py_info/1/ac2eaa0ea0ebeafcc7822e65e46aa9d4f966f30b695406963e145ea4a91cd4fc.json [virtualenv/app_data/via_disk_folder.py:129]
.pkg: 484 I proposed PathPythonInfo(spec=CPython3.9.16.final.0-64, system=/usr/local/opt/python@3.9/bin/python3.9, exe=/usr/local/bin/python3.9, platform=darwin, version='3.9.16 (main, Dec  7 2022, 10:15:43) \n[Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:63]
.pkg: 484 D accepted PathPythonInfo(spec=CPython3.9.16.final.0-64, system=/usr/local/opt/python@3.9/bin/python3.9, exe=/usr/local/bin/python3.9, platform=darwin, version='3.9.16 (main, Dec  7 2022, 10:15:43) \n[Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:65]
.pkg: 490 I find interpreter for spec PythonSpec(major=3, minor=10) [virtualenv/discovery/builtin.py:56]
.pkg: 490 I proposed PythonInfo(spec=CPython3.11.1.final.0-64, system=/usr/local/opt/python@3.11/bin/python3.11, exe=/usr/local/Cellar/tox/4.3.3/libexec/bin/python3.11, platform=darwin, version='3.11.1 (main, Dec 23 2022, 09:39:26) [Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:63]
.pkg: 527 D discover PATH[0]=/usr/local/bin [virtualenv/discovery/builtin.py:108]
.pkg: 529 D got python info of /usr/local/bin/python3.10 from /Users/barry/Library/Application Support/virtualenv/py_info/1/7e1998ff7f8aa20ada591c520b972326324e5ea05489af9e422744c7c09f6dad.json [virtualenv/app_data/via_disk_folder.py:129]
.pkg: 530 D got python info of /usr/local/opt/python@3.10/bin/python3.10 from /Users/barry/Library/Application Support/virtualenv/py_info/1/8f9328efe3468e6c370cdfed98702d3986faf748314d5bcec59da615d65baa7a.json [virtualenv/app_data/via_disk_folder.py:129]
.pkg: 530 I proposed PathPythonInfo(spec=CPython3.10.9.final.0-64, system=/usr/local/opt/python@3.10/bin/python3.10, exe=/usr/local/bin/python3.10, platform=darwin, version='3.10.9 (main, Dec 15 2022, 18:18:30) [Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:63]
.pkg: 530 D accepted PathPythonInfo(spec=CPython3.10.9.final.0-64, system=/usr/local/opt/python@3.10/bin/python3.10, exe=/usr/local/bin/python3.10, platform=darwin, version='3.10.9 (main, Dec 15 2022, 18:18:30) [Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:65]
.pkg: 599 I find interpreter for spec PythonSpec(path=/usr/local/Cellar/tox/4.3.3/libexec/bin/python3.11) [virtualenv/discovery/builtin.py:56]
.pkg: 599 I proposed PythonInfo(spec=CPython3.11.1.final.0-64, system=/usr/local/opt/python@3.11/bin/python3.11, exe=/usr/local/Cellar/tox/4.3.3/libexec/bin/python3.11, platform=darwin, version='3.11.1 (main, Dec 23 2022, 09:39:26) [Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:63]
.pkg: 599 D accepted PythonInfo(spec=CPython3.11.1.final.0-64, system=/usr/local/opt/python@3.11/bin/python3.11, exe=/usr/local/Cellar/tox/4.3.3/libexec/bin/python3.11, platform=darwin, version='3.11.1 (main, Dec 23 2022, 09:39:26) [Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:65]
.pkg: 662 I find interpreter for spec PythonSpec(path=/usr/local/Cellar/tox/4.3.3/libexec/bin/python3.11) [virtualenv/discovery/builtin.py:56]
.pkg: 662 I proposed PythonInfo(spec=CPython3.11.1.final.0-64, system=/usr/local/opt/python@3.11/bin/python3.11, exe=/usr/local/Cellar/tox/4.3.3/libexec/bin/python3.11, platform=darwin, version='3.11.1 (main, Dec 23 2022, 09:39:26) [Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:63]
.pkg: 662 D accepted PythonInfo(spec=CPython3.11.1.final.0-64, system=/usr/local/opt/python@3.11/bin/python3.11, exe=/usr/local/Cellar/tox/4.3.3/libexec/bin/python3.11, platform=darwin, version='3.11.1 (main, Dec 23 2022, 09:39:26) [Clang 14.0.0 (clang-1400.0.29.202)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:65]
.pkg: 664 W remove tox env folder /Users/barry/projects/flufl/lock/.tox/.pkg [tox/tox_env/api.py:321]
py311: 665 I create virtual environment via CPython3Posix(dest=/Users/barry/projects/flufl/lock/.tox/py311, clear=False, no_vcs_ignore=False, global=False) [virtualenv/run/session.py:48]
py311: 720 D create folder /Users/barry/projects/flufl/lock/.tox/py311/bin [virtualenv/util/path/_sync.py:9]
py311: 721 D create folder /Users/barry/projects/flufl/lock/.tox/py311/lib/python3.11/site-packages [virtualenv/util/path/_sync.py:9]
py311: 721 D write /Users/barry/projects/flufl/lock/.tox/py311/pyvenv.cfg [virtualenv/create/pyenv_cfg.py:30]
py311: 721 D 	home = /usr/local/opt/python@3.11/bin [virtualenv/create/pyenv_cfg.py:34]
py311: 721 D 	implementation = CPython [virtualenv/create/pyenv_cfg.py:34]
py311: 721 D 	version_info = 3.11.1.final.0 [virtualenv/create/pyenv_cfg.py:34]
py311: 721 D 	virtualenv = 20.17.1 [virtualenv/create/pyenv_cfg.py:34]
py311: 721 D 	include-system-site-packages = false [virtualenv/create/pyenv_cfg.py:34]
py311: 721 D 	base-prefix = /usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11 [virtualenv/create/pyenv_cfg.py:34]
py311: 782 D 	base-exec-prefix = /usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11 [virtualenv/create/pyenv_cfg.py:34]
py311: 782 D 	base-executable = /usr/local/opt/python@3.11/bin/python3.11 [virtualenv/create/pyenv_cfg.py:34]
py311: 782 D symlink /usr/local/opt/python@3.11/bin/python3.11 to /Users/barry/projects/flufl/lock/.tox/py311/bin/python [virtualenv/util/path/_sync.py:28]
py311: 783 D create virtualenv import hook file /Users/barry/projects/flufl/lock/.tox/py311/lib/python3.11/site-packages/_virtualenv.pth [virtualenv/create/via_global_ref/api.py:89]
py311: 784 D create /Users/barry/projects/flufl/lock/.tox/py311/lib/python3.11/site-packages/_virtualenv.py [virtualenv/create/via_global_ref/api.py:92]
py311: 784 D ============================== target debug ============================== [virtualenv/run/session.py:50]
py311: 785 D debug via /Users/barry/projects/flufl/lock/.tox/py311/bin/python /usr/local/Cellar/tox/4.3.3/libexec/lib/python3.11/site-packages/virtualenv/create/debug.py [virtualenv/create/creator.py:197]
py311: 784 D {
  "sys": {
    "executable": "/Users/barry/projects/flufl/lock/.tox/py311/bin/python",
    "_base_executable": "/usr/local/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/bin/python3.11",
    "prefix": "/Users/barry/projects/flufl/lock/.tox/py311",
    "base_prefix": "/usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11",
    "real_prefix": null,
    "exec_prefix": "/Users/barry/projects/flufl/lock/.tox/py311",
    "base_exec_prefix": "/usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11",
    "path": [
      "/Users/barry/env/python",
      "/usr/local/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python311.zip",
      "/usr/local/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python3.11",
      "/usr/local/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/lib-dynload",
      "/Users/barry/projects/flufl/lock/.tox/py311/lib/python3.11/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": "utf-8"
  },
  "version": "3.11.1 (main, Dec 23 2022, 09:39:26) [Clang 14.0.0 (clang-1400.0.29.202)]",
  "makefile_filename": "/usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/config-3.11-darwin/Makefile",
  "os": "<module 'os' (frozen)>",
  "site": "<module 'site' (frozen)>",
  "datetime": "<module 'datetime' from '/usr/local/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/datetime.py'>",
  "math": "<module 'math' from '/usr/local/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/math.cpython-311-darwin.so'>",
  "json": "<module 'json' from '/usr/local/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/__init__.py'>"
} [virtualenv/run/session.py:51]
py311: 975 I add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/barry/Library/Application Support/virtualenv) [virtualenv/run/session.py:55]
py311: 979 D got embed update of distribution setuptools from /Users/barry/Library/Application Support/virtualenv/wheel/3.11/embed/3/setuptools.json [virtualenv/app_data/via_disk_folder.py:129]
py311: 979 D got embed update of distribution pip from /Users/barry/Library/Application Support/virtualenv/wheel/3.11/embed/3/pip.json [virtualenv/app_data/via_disk_folder.py:129]
py311: 980 D got embed update of distribution wheel from /Users/barry/Library/Application Support/virtualenv/wheel/3.11/embed/3/wheel.json [virtualenv/app_data/via_disk_folder.py:129]
py311: 983 D install setuptools from wheel /usr/local/Cellar/tox/4.3.3/libexec/lib/python3.11/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: 983 D install pip from wheel /usr/local/Cellar/tox/4.3.3/libexec/lib/python3.11/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: 983 D install wheel from wheel /usr/local/Cellar/tox/4.3.3/libexec/lib/python3.11/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: 1036 D copy /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/pip-22.3.1-py3-none-any/pip-22.3.1.virtualenv to /Users/barry/projects/flufl/lock/.tox/py311/lib/python3.11/site-packages/pip-22.3.1.virtualenv [virtualenv/util/path/_sync.py:36]
py311: 1037 D copy /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/setuptools-65.6.3.virtualenv to /Users/barry/projects/flufl/lock/.tox/py311/lib/python3.11/site-packages/setuptools-65.6.3.virtualenv [virtualenv/util/path/_sync.py:36]
py311: 1037 D copy directory /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/wheel-0.38.4-py3-none-any/wheel to /Users/barry/projects/flufl/lock/.tox/py311/lib/python3.11/site-packages/wheel [virtualenv/util/path/_sync.py:36]
py311: 1037 D copy directory /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/pip-22.3.1-py3-none-any/pip to /Users/barry/projects/flufl/lock/.tox/py311/lib/python3.11/site-packages/pip [virtualenv/util/path/_sync.py:36]
py311: 1088 D copy /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/distutils-precedence.pth to /Users/barry/projects/flufl/lock/.tox/py311/lib/python3.11/site-packages/distutils-precedence.pth [virtualenv/util/path/_sync.py:36]
py311: 1088 D copy directory /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/setuptools-65.6.3.dist-info to /Users/barry/projects/flufl/lock/.tox/py311/lib/python3.11/site-packages/setuptools-65.6.3.dist-info [virtualenv/util/path/_sync.py:36]
py311: 1097 D copy /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/wheel-0.38.4-py3-none-any/wheel-0.38.4.virtualenv to /Users/barry/projects/flufl/lock/.tox/py311/lib/python3.11/site-packages/wheel-0.38.4.virtualenv [virtualenv/util/path/_sync.py:36]
py311: 1150 D copy directory /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/wheel-0.38.4-py3-none-any/wheel-0.38.4.dist-info to /Users/barry/projects/flufl/lock/.tox/py311/lib/python3.11/site-packages/wheel-0.38.4.dist-info [virtualenv/util/path/_sync.py:36]
py311: 1156 D copy directory /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/setuptools to /Users/barry/projects/flufl/lock/.tox/py311/lib/python3.11/site-packages/setuptools [virtualenv/util/path/_sync.py:36]
py311: 1158 D generated console scripts wheel-3.11 wheel3.11 wheel3 wheel [virtualenv/seed/embed/via_app_data/pip_install/base.py:41]
py311: 1326 D copy directory /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/pkg_resources to /Users/barry/projects/flufl/lock/.tox/py311/lib/python3.11/site-packages/pkg_resources [virtualenv/util/path/_sync.py:36]
py311: 1356 D copy directory /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/_distutils_hack to /Users/barry/projects/flufl/lock/.tox/py311/lib/python3.11/site-packages/_distutils_hack [virtualenv/util/path/_sync.py:36]
py311: 1358 D generated console scripts  [virtualenv/seed/embed/via_app_data/pip_install/base.py:41]
py311: 1379 D copy directory /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/pip-22.3.1-py3-none-any/pip-22.3.1.dist-info to /Users/barry/projects/flufl/lock/.tox/py311/lib/python3.11/site-packages/pip-22.3.1.dist-info [virtualenv/util/path/_sync.py:36]
py311: 1383 D generated console scripts pip-3.11 pip3.11 pip pip3 [virtualenv/seed/embed/via_app_data/pip_install/base.py:41]
py311: 1384 I add activators for Bash, CShell, Fish, Nushell, PowerShell, Python [virtualenv/run/session.py:61]
py311: 1389 D write /Users/barry/projects/flufl/lock/.tox/py311/pyvenv.cfg [virtualenv/create/pyenv_cfg.py:30]
py311: 1389 D 	home = /usr/local/opt/python@3.11/bin [virtualenv/create/pyenv_cfg.py:34]
py311: 1389 D 	implementation = CPython [virtualenv/create/pyenv_cfg.py:34]
py311: 1389 D 	version_info = 3.11.1.final.0 [virtualenv/create/pyenv_cfg.py:34]
py311: 1389 D 	virtualenv = 20.17.1 [virtualenv/create/pyenv_cfg.py:34]
py311: 1389 D 	include-system-site-packages = false [virtualenv/create/pyenv_cfg.py:34]
py311: 1389 D 	base-prefix = /usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11 [virtualenv/create/pyenv_cfg.py:34]
py311: 1389 D 	base-exec-prefix = /usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11 [virtualenv/create/pyenv_cfg.py:34]
py311: 1389 D 	base-executable = /usr/local/opt/python@3.11/bin/python3.11 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 1393 I create virtual environment via CPython3Posix(dest=/Users/barry/projects/flufl/lock/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False) [virtualenv/run/session.py:48]
.pkg: 1446 D create folder /Users/barry/projects/flufl/lock/.tox/.pkg/bin [virtualenv/util/path/_sync.py:9]
.pkg: 1446 D create folder /Users/barry/projects/flufl/lock/.tox/.pkg/lib/python3.11/site-packages [virtualenv/util/path/_sync.py:9]
.pkg: 1446 D write /Users/barry/projects/flufl/lock/.tox/.pkg/pyvenv.cfg [virtualenv/create/pyenv_cfg.py:30]
.pkg: 1446 D 	home = /usr/local/opt/python@3.11/bin [virtualenv/create/pyenv_cfg.py:34]
.pkg: 1446 D 	implementation = CPython [virtualenv/create/pyenv_cfg.py:34]
.pkg: 1446 D 	version_info = 3.11.1.final.0 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 1446 D 	virtualenv = 20.17.1 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 1446 D 	include-system-site-packages = false [virtualenv/create/pyenv_cfg.py:34]
.pkg: 1446 D 	base-prefix = /usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 1446 D 	base-exec-prefix = /usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 1501 D 	base-executable = /usr/local/opt/python@3.11/bin/python3.11 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 1503 D symlink /usr/local/opt/python@3.11/bin/python3.11 to /Users/barry/projects/flufl/lock/.tox/.pkg/bin/python [virtualenv/util/path/_sync.py:28]
.pkg: 1504 D create virtualenv import hook file /Users/barry/projects/flufl/lock/.tox/.pkg/lib/python3.11/site-packages/_virtualenv.pth [virtualenv/create/via_global_ref/api.py:89]
.pkg: 1504 D create /Users/barry/projects/flufl/lock/.tox/.pkg/lib/python3.11/site-packages/_virtualenv.py [virtualenv/create/via_global_ref/api.py:92]
.pkg: 1505 D ============================== target debug ============================== [virtualenv/run/session.py:50]
.pkg: 1505 D debug via /Users/barry/projects/flufl/lock/.tox/.pkg/bin/python /usr/local/Cellar/tox/4.3.3/libexec/lib/python3.11/site-packages/virtualenv/create/debug.py [virtualenv/create/creator.py:197]
.pkg: 1505 D {
  "sys": {
    "executable": "/Users/barry/projects/flufl/lock/.tox/.pkg/bin/python",
    "_base_executable": "/usr/local/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/bin/python3.11",
    "prefix": "/Users/barry/projects/flufl/lock/.tox/.pkg",
    "base_prefix": "/usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11",
    "real_prefix": null,
    "exec_prefix": "/Users/barry/projects/flufl/lock/.tox/.pkg",
    "base_exec_prefix": "/usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11",
    "path": [
      "/Users/barry/env/python",
      "/usr/local/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python311.zip",
      "/usr/local/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python3.11",
      "/usr/local/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/lib-dynload",
      "/Users/barry/projects/flufl/lock/.tox/.pkg/lib/python3.11/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": "utf-8"
  },
  "version": "3.11.1 (main, Dec 23 2022, 09:39:26) [Clang 14.0.0 (clang-1400.0.29.202)]",
  "makefile_filename": "/usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/config-3.11-darwin/Makefile",
  "os": "<module 'os' (frozen)>",
  "site": "<module 'site' (frozen)>",
  "datetime": "<module 'datetime' from '/usr/local/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/datetime.py'>",
  "math": "<module 'math' from '/usr/local/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/math.cpython-311-darwin.so'>",
  "json": "<module 'json' from '/usr/local/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/__init__.py'>"
} [virtualenv/run/session.py:51]
.pkg: 1679 I add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/barry/Library/Application Support/virtualenv) [virtualenv/run/session.py:55]
.pkg: 1682 D got embed update of distribution setuptools from /Users/barry/Library/Application Support/virtualenv/wheel/3.11/embed/3/setuptools.json [virtualenv/app_data/via_disk_folder.py:129]
.pkg: 1682 D got embed update of distribution pip from /Users/barry/Library/Application Support/virtualenv/wheel/3.11/embed/3/pip.json [virtualenv/app_data/via_disk_folder.py:129]
.pkg: 1682 D got embed update of distribution wheel from /Users/barry/Library/Application Support/virtualenv/wheel/3.11/embed/3/wheel.json [virtualenv/app_data/via_disk_folder.py:129]
.pkg: 1683 D install setuptools from wheel /usr/local/Cellar/tox/4.3.3/libexec/lib/python3.11/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: 1683 D install pip from wheel /usr/local/Cellar/tox/4.3.3/libexec/lib/python3.11/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: 1683 D install wheel from wheel /usr/local/Cellar/tox/4.3.3/libexec/lib/python3.11/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: 1733 D copy /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/setuptools-65.6.3.virtualenv to /Users/barry/projects/flufl/lock/.tox/.pkg/lib/python3.11/site-packages/setuptools-65.6.3.virtualenv [virtualenv/util/path/_sync.py:36]
.pkg: 1733 D copy /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/pip-22.3.1-py3-none-any/pip-22.3.1.virtualenv to /Users/barry/projects/flufl/lock/.tox/.pkg/lib/python3.11/site-packages/pip-22.3.1.virtualenv [virtualenv/util/path/_sync.py:36]
.pkg: 1733 D copy directory /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/wheel-0.38.4-py3-none-any/wheel to /Users/barry/projects/flufl/lock/.tox/.pkg/lib/python3.11/site-packages/wheel [virtualenv/util/path/_sync.py:36]
.pkg: 1734 D copy /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/distutils-precedence.pth to /Users/barry/projects/flufl/lock/.tox/.pkg/lib/python3.11/site-packages/distutils-precedence.pth [virtualenv/util/path/_sync.py:36]
.pkg: 1787 D copy directory /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/pip-22.3.1-py3-none-any/pip to /Users/barry/projects/flufl/lock/.tox/.pkg/lib/python3.11/site-packages/pip [virtualenv/util/path/_sync.py:36]
.pkg: 1787 D copy directory /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/setuptools-65.6.3.dist-info to /Users/barry/projects/flufl/lock/.tox/.pkg/lib/python3.11/site-packages/setuptools-65.6.3.dist-info [virtualenv/util/path/_sync.py:36]
.pkg: 1796 D copy /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/wheel-0.38.4-py3-none-any/wheel-0.38.4.virtualenv to /Users/barry/projects/flufl/lock/.tox/.pkg/lib/python3.11/site-packages/wheel-0.38.4.virtualenv [virtualenv/util/path/_sync.py:36]
.pkg: 1842 D copy directory /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/wheel-0.38.4-py3-none-any/wheel-0.38.4.dist-info to /Users/barry/projects/flufl/lock/.tox/.pkg/lib/python3.11/site-packages/wheel-0.38.4.dist-info [virtualenv/util/path/_sync.py:36]
.pkg: 1847 D copy directory /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/setuptools to /Users/barry/projects/flufl/lock/.tox/.pkg/lib/python3.11/site-packages/setuptools [virtualenv/util/path/_sync.py:36]
.pkg: 1850 D generated console scripts wheel wheel-3.11 wheel3.11 wheel3 [virtualenv/seed/embed/via_app_data/pip_install/base.py:41]
.pkg: 2012 D copy directory /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/pkg_resources to /Users/barry/projects/flufl/lock/.tox/.pkg/lib/python3.11/site-packages/pkg_resources [virtualenv/util/path/_sync.py:36]
.pkg: 2038 D copy directory /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/_distutils_hack to /Users/barry/projects/flufl/lock/.tox/.pkg/lib/python3.11/site-packages/_distutils_hack [virtualenv/util/path/_sync.py:36]
.pkg: 2040 D generated console scripts  [virtualenv/seed/embed/via_app_data/pip_install/base.py:41]
.pkg: 2047 D copy directory /Users/barry/Library/Application Support/virtualenv/wheel/3.11/image/1/CopyPipInstall/pip-22.3.1-py3-none-any/pip-22.3.1.dist-info to /Users/barry/projects/flufl/lock/.tox/.pkg/lib/python3.11/site-packages/pip-22.3.1.dist-info [virtualenv/util/path/_sync.py:36]
.pkg: 2054 D generated console scripts pip pip-3.11 pip3 pip3.11 [virtualenv/seed/embed/via_app_data/pip_install/base.py:41]
.pkg: 2054 I add activators for Bash, CShell, Fish, Nushell, PowerShell, Python [virtualenv/run/session.py:61]
.pkg: 2056 D write /Users/barry/projects/flufl/lock/.tox/.pkg/pyvenv.cfg [virtualenv/create/pyenv_cfg.py:30]
.pkg: 2235 D 	home = /usr/local/opt/python@3.11/bin [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2235 D 	implementation = CPython [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2235 D 	version_info = 3.11.1.final.0 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2235 D 	virtualenv = 20.17.1 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2235 D 	include-system-site-packages = false [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2235 D 	base-prefix = /usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2235 D 	base-exec-prefix = /usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2235 D 	base-executable = /usr/local/opt/python@3.11/bin/python3.11 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2239 W install_requires> python -I -m pip install pdm-pep517 [tox/tox_env/api.py:427]
Collecting pdm-pep517
  Using cached pdm_pep517-1.0.6-py3-none-any.whl (306 kB)
Installing collected packages: pdm-pep517
Successfully installed pdm-pep517-1.0.6
.pkg: 4072 I exit 0 (1.83 seconds) /Users/barry/projects/flufl/lock> python -I -m pip install pdm-pep517 pid=51584 [tox/execute/api.py:275]
.pkg: 4074 W _optional_hooks> python /usr/local/Cellar/tox/4.3.3/libexec/lib/python3.11/site-packages/pyproject_api/_backend.py True pdm.pep517.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 /var/folders/rs/9f06blm90d5dxmg_7wtm434w0000gn/T/pep517__optional_hooks-vrac01n3.json
.pkg: 4318 I exit None (0.24 seconds) /Users/barry/projects/flufl/lock> python /usr/local/Cellar/tox/4.3.3/libexec/lib/python3.11/site-packages/pyproject_api/_backend.py True pdm.pep517.api pid=51585 [tox/execute/api.py:275]
.pkg: 4319 W get_requires_for_build_editable> python /usr/local/Cellar/tox/4.3.3/libexec/lib/python3.11/site-packages/pyproject_api/_backend.py True pdm.pep517.api [tox/tox_env/api.py:427]
Backend: run command get_requires_for_build_editable with args {'config_settings': None}
Backend: Wrote response {'return': []} to /var/folders/rs/9f06blm90d5dxmg_7wtm434w0000gn/T/pep517_get_requires_for_build_editable-rxgvt3ws.json
.pkg: 4345 I exit None (0.03 seconds) /Users/barry/projects/flufl/lock> python /usr/local/Cellar/tox/4.3.3/libexec/lib/python3.11/site-packages/pyproject_api/_backend.py True pdm.pep517.api pid=51585 [tox/execute/api.py:275]
.pkg: 4348 W build_editable> python /usr/local/Cellar/tox/4.3.3/libexec/lib/python3.11/site-packages/pyproject_api/_backend.py True pdm.pep517.api [tox/tox_env/api.py:427]
Backend: run command build_editable with args {'wheel_directory': '/Users/barry/projects/flufl/lock/.tox/.pkg/dist', 'config_settings': {'--build-option': []}, 'metadata_directory': '/Users/barry/projects/flufl/lock/.tox/.pkg/.meta'}
 - Adding flufl.lock.pth
Backend: Wrote response {'return': 'flufl.lock-7.1.2-py3-none-any.whl'} to /var/folders/rs/9f06blm90d5dxmg_7wtm434w0000gn/T/pep517_build_editable-z2jvxf8p.json
.pkg: 4416 I exit None (0.01 seconds) /Users/barry/projects/flufl/lock> python /usr/local/Cellar/tox/4.3.3/libexec/lib/python3.11/site-packages/pyproject_api/_backend.py True pdm.pep517.api pid=51585 [tox/execute/api.py:275]
.pkg: 4418 D package .tmp/package/1/flufl.lock-7.1.2-py3-none-any.whl links to .pkg/dist/flufl.lock-7.1.2-py3-none-any.whl (/Users/barry/projects/flufl/lock/.tox) [tox/util/file_view.py:36]
py311: 4419 W install_package_deps> python -I -m pip install 'atpublic>=2.3' 'psutil>=5.9.0' 'typing_extensions; python_version < "3.8"' [tox/tox_env/api.py:427]
Ignoring typing_extensions: markers 'python_version < "3.8"' don't match your environment
Collecting atpublic>=2.3
  Using cached atpublic-3.1.1-py3-none-any.whl (4.8 kB)
Collecting psutil>=5.9.0
  Using cached psutil-5.9.4-cp36-abi3-macosx_10_9_x86_64.whl (243 kB)
Installing collected packages: psutil, atpublic
Successfully installed atpublic-3.1.1 psutil-5.9.4
py311: 6671 I exit 0 (2.18 seconds) /Users/barry/projects/flufl/lock> python -I -m pip install 'atpublic>=2.3' 'psutil>=5.9.0' 'typing_extensions; python_version < "3.8"' pid=51586 [tox/execute/api.py:275]
py311: 6673 W install_package> python -I -m pip install --force-reinstall --no-deps /Users/barry/projects/flufl/lock/.tox/.tmp/package/1/flufl.lock-7.1.2-py3-none-any.whl [tox/tox_env/api.py:427]
Processing ./.tox/.tmp/package/1/flufl.lock-7.1.2-py3-none-any.whl
ERROR: flufl-lock has an invalid wheel, flufl-lock has an invalid wheel, could not read 'flufl.lock-7.1.2.dist-info/WHEEL' file: KeyError("There is no item named 'flufl.lock-7.1.2.dist-info/WHEEL' in the archive")
py311: 7265 C exit 1 (0.59 seconds) /Users/barry/projects/flufl/lock> python -I -m pip install --force-reinstall --no-deps /Users/barry/projects/flufl/lock/.tox/.tmp/package/1/flufl.lock-7.1.2-py3-none-any.whl pid=51587 [tox/execute/api.py:275]
.pkg: 7267 W _exit> python /usr/local/Cellar/tox/4.3.3/libexec/lib/python3.11/site-packages/pyproject_api/_backend.py True pdm.pep517.api [tox/tox_env/api.py:427]
Backend: run command _exit with args {}
Backend: Wrote response {'return': 0} to /var/folders/rs/9f06blm90d5dxmg_7wtm434w0000gn/T/pep517__exit-u66ojk0e.json
.pkg: 7269 I exit None (0.00 seconds) /Users/barry/projects/flufl/lock> python /usr/local/Cellar/tox/4.3.3/libexec/lib/python3.11/site-packages/pyproject_api/_backend.py True pdm.pep517.api pid=51585 [tox/execute/api.py:275]
.pkg: 7298 D delete package /Users/barry/projects/flufl/lock/.tox/.tmp/package/1/flufl.lock-7.1.2-py3-none-any.whl [tox/tox_env/python/virtual_env/package/pyproject.py:171]
  py311: FAIL code 1 (6.65 seconds)
  evaluation failed :( (7.15 seconds)

Minimal example

If possible, provide a minimal reproducer for the issue:

$ git clone https://gitlab.com/warsaw/flufl.lock.git
$ cd flufl.lock
$ tox run -e py311
@gaborbernat
Copy link
Member

gaborbernat commented Jan 17, 2023

tox 3 did not use editable wheels. tox 4 does. pdm is clearly generating a broken editable wheel, that feature was just not used on tox v3.

pdm build might be doing something different then how we call build_editable. But considering every other backend works fine, I think pdm is likely in wrong here.

@kurtmckee
Copy link
Contributor

kurtmckee commented Jan 17, 2023

every other backend works fine

Poetry-backed wheel generation is failing with the same error message. #2870

@warsaw
Copy link
Author

warsaw commented Jan 17, 2023

flit works. All I needed to do was change my build-system in pyproject.toml to this:

[build-system]
requires = ['flit_core >=3.2,<4']
build-backend = 'flit_core.buildapi'

I briefly tried hatchling but looks like I need to make other config changes.

@gaborbernat says:

But considering every other backend works fine, I think pdm is likely in wrong here.

Which build backends does tox actually test with? Given that it's now reported that pdm and poetry backends are broken, I'm not sure this claim is accurate.

@masenf
Copy link
Collaborator

masenf commented Jan 17, 2023

I'm preparing a proper bug report for tox-dev/pyproject-api, so please stand by, but in the short term:

https://github.com/tox-dev/pyproject-api/blob/fa24321b800d6491c47c5c57a960362263712b2f/src/pyproject_api/_frontend.py#L449-L458

https://github.com/python-poetry/poetry-core/blob/978fb55a2f78e1e11cd226722713c70a102dc40d/src/poetry/core/masonry/builders/wheel.py#L125-L130

https://github.com/pdm-project/pdm-backend/blob/20d0fb1bdd0ce114a160a90cf148b30459740e26/src/pdm/backend/wheel.py#L281-L287

In both cases, these backends are following the spec PEP 517: if the frontend provides a metadata_directory, then the backend MUST use it as is... and tox (via pyproject-api) is providing an empty metadata_directory when calling these backends, so it creates a package with no metadata.

@gaborbernat
Copy link
Member

Guess the question is what does provide mean? Just specify or does it needs to actually have proper metadata in it. That is if the director is empty, shouldn't the back end regenerate it?

@gaborbernat gaborbernat reopened this Jan 17, 2023
@masenf
Copy link
Collaborator

masenf commented Jan 17, 2023

what does provide mean? Just specify or does it needs to actually have proper metadata in it.

My interpretation of the spec reads as, if you provide a directory, then the wheel must contain that directory exactly

From PEP 517

The directory passed in by the build frontend MUST be identical to the directory created by prepare_metadata_for_build_wheel, including any unrecognized files it created.

@gaborbernat
Copy link
Member

flit works. All I needed to do was change my build-system in pyproject.toml to this:

[build-system]
requires = ['flit_core >=3.2,<4']
build-backend = 'flit_core.buildapi'

I briefly tried hatchling but looks like I need to make other config changes.

@gaborbernat says:

But considering every other backend works fine, I think pdm is likely in wrong here.

Which build backends does tox actually test with? Given that it's now reported that pdm and poetry backends are broken, I'm not sure this claim is accurate.

Setuptools, hatch and flit are tested and works. Poetry and pdm are esoteric enough that didn't add tests to it.

@masenf
Copy link
Collaborator

masenf commented Jan 17, 2023

@gaborbernat i filed tox-dev/pyproject-api#47; have an idea for a minimal fix

@masenf
Copy link
Collaborator

masenf commented Jan 18, 2023

With tox-dev/pyproject-api#48, I'm no longer reproducing #2870

pip install -U git+https://github.com/masenf/pyproject-api@metadata_from_built_wheel

However this issue still remains; the crux is that pyproject.toml is using actual PEP 621 metadata, whereas with poetry it's not. In this case, tox never calls into _ensure_meta_present, so it ends up with an empty metadata_directory that it subsequently passes off to pyproject_api. This will require a fix within tox itself.

I'm thinking something along the lines of "if metadata_directory is empty, then pass None to build_wheel / build_editable.

@gaborbernat
Copy link
Member

gaborbernat commented Jan 18, 2023

@gaborbernat
Copy link
Member

I'm thinking something along the lines of "if metadata_directory is empty, then pass None to build_wheel / build_editable.

Yes please 👍

masenf added a commit to masenf/tox that referenced this issue Jan 18, 2023
Passing empty `metadata_directory` to `build_wheel` or `build_editable` can
cause some PEP 517 backends to create a wheel without metadata.

Fix tox-dev#2880
masenf added a commit to masenf/tox that referenced this issue Jan 18, 2023
Passing empty `metadata_directory` to `build_wheel` or `build_editable` can
cause some PEP 517 backends to create a wheel without metadata.

Fix tox-dev#2880
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants