ionelmc / tox-wheel

A Tox plugin that builds and installs wheels instead of sdist. Note that this plugin is obsolte as tox 4.0 already has wheel support.
BSD 2-Clause "Simplified" License
23 stars 9 forks source link

tox-wheel breaks tox 4.0.2 #25

Closed kevinior closed 1 year ago

kevinior commented 1 year ago

If I install tox-wheel 1.0.0 together with tox 4.0.2 and try to run tox (here just tox --help):

Traceback (most recent call last):
  File "PROJECTPATH/venv/bin/tox", line 8, in <module>
    sys.exit(run())
  File "PROJECTPATH/venv/lib/python3.10/site-packages/tox/run.py", line 19, in run
    result = main(sys.argv[1:] if args is None else args)
  File "PROJECTPATH/venv/lib/python3.10/site-packages/tox/run.py", line 38, in main
    state = setup_state(args)
  File "PROJECTPATH/venv/lib/python3.10/site-packages/tox/run.py", line 53, in setup_state
    options = get_options(*args)
  File "PROJECTPATH/venv/lib/python3.10/site-packages/tox/config/cli/parse.py", line 38, in get_options
    guess_verbosity, log_handler, source = _get_base(args)
  File "PROJECTPATH/venv/lib/python3.10/site-packages/tox/config/cli/parse.py", line 61, in _get_base
    MANAGER.load_plugins(source.path)
  File "PROJECTPATH/venv/lib/python3.10/site-packages/tox/plugin/manager.py", line 83, in load_plugins
    self._register_plugins(inline)
  File "PROJECTPATH/venv/lib/python3.10/site-packages/tox/plugin/manager.py", line 37, in _register_plugins
    self.manager.load_setuptools_entrypoints(NAME)
  File "PROJECTPATH/venv/lib/python3.10/site-packages/pluggy/_manager.py", line 287, in load_setuptools_entrypoints
    plugin = ep.load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "PROJECTPATH/venv/lib/python3.10/site-packages/tox_wheel/plugin.py", line 7, in <module>
    from tox import package
ImportError: cannot import name 'package' from 'tox' (PROJECTPATH/venv/lib/python3.10/site-packages/tox/__init__.py)

It looks like tox-wheel is affected by some of the tox 4 breaking changes

This is on Linux 5.15.0-56-generic #62-Ubuntu SMP x86_64.

kevinior commented 1 year ago

Never mind, I see that tox 4 has built-in wheel support.

tvainika commented 1 year ago

It would be useful to document that tox-wheel no longer works with tox 4, and this package is deprecated.