timothycrosley / streamdeck-ui

A Linux compatible UI for the Elgato Stream Deck.
https://timothycrosley.github.io/streamdeck-ui/
MIT License
1.14k stars 242 forks source link

ImportError: cannot import name 'ConfigMetadataHandler' from 'setuptools.config' (/usr/lib/python3.10/site-packages/setuptools/config/__init__.py) #241

Closed dhtseany closed 2 years ago

dhtseany commented 2 years ago

Describe the bug When attempting to install using a fresh build on Arch Linux we're receiving the following error:

ImportError: cannot import name 'ConfigMetadataHandler' from 'setuptools.config' (/usr/lib/python3.10/site-packages/setuptools/config/__init__.py)

To Reproduce Steps to reproduce the behavior: Clean build of Arch Linux to June 2021 Attempt to install 2.0.4

Operating system (please complete the following information) Arch Linux as of 6/28/2022, uname -a: Linux archtop4 5.18.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 25 Jun 2022 20:22:01 +0000 x86_64 GNU/Linux

Versions: python-dephell-0.8.3-7 python-setuptools 1:61.3.1-1 Python 3.10.5

More info available upon request.

dhtseany commented 2 years ago

Full trace: Traceback (most recent call last): File "/usr/bin/dephell", line 33, in <module> sys.exit(load_entry_point('dephell==0.8.3', 'console_scripts', 'dephell')()) File "/usr/bin/dephell", line 25, in importlib_load_entry_point return next(matches).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 "/usr/lib/python3.10/site-packages/dephell/cli.py", line 11, in <module> from .commands import COMMANDS File "/usr/lib/python3.10/site-packages/dephell/commands/__init__.py", line 2, in <module> from .discover import COMMANDS File "/usr/lib/python3.10/site-packages/dephell/commands/discover.py", line 86, in <module> module = import_module('.' + module_name, package=package) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/usr/lib/python3.10/site-packages/dephell/commands/deps_add.py", line 7, in <module> from ..actions import get_resolver File "/usr/lib/python3.10/site-packages/dephell/actions/__init__.py", line 7, in <module> from ._converting import attach_deps File "/usr/lib/python3.10/site-packages/dephell/actions/_converting.py", line 7, in <module> from ..converters import CONVERTERS File "/usr/lib/python3.10/site-packages/dephell/converters/__init__.py", line 7, in <module> from .egginfo import EggInfoConverter File "/usr/lib/python3.10/site-packages/dephell/converters/egginfo.py", line 21, in <module> from .setuppy import SetupPyConverter File "/usr/lib/python3.10/site-packages/dephell/converters/setuppy.py", line 12, in <module> from dephell_setuptools import read_setup File "/usr/lib/python3.10/site-packages/dephell_setuptools/__init__.py", line 4, in <module> from ._cfg import CfgReader File "/usr/lib/python3.10/site-packages/dephell_setuptools/_cfg.py", line 8, in <module> from setuptools.config import ConfigMetadataHandler, ConfigOptionsHandler ImportError: cannot import name 'ConfigMetadataHandler' from 'setuptools.config' (/usr/lib/python3.10/site-packages/setuptools/config/__init__.py)

fuxx commented 2 years ago

Same for me :) Also on Arch :)

Linux smp-officepc 5.18.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 30 May 2022 17:53:11 +0000 x86_64 GNU/Linux

fuxx commented 2 years ago
  -> Extracting streamdeck-ui-2.0.4.tar.gz with bsdtar
==> Starting prepare()...
Traceback (most recent call last):
  File "/usr/bin/dephell", line 33, in <module>
    sys.exit(load_entry_point('dephell==0.8.3', 'console_scripts', 'dephell')())
  File "/usr/bin/dephell", line 25, in importlib_load_entry_point
    return next(matches).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 "/usr/lib/python3.10/site-packages/dephell/cli.py", line 11, in <module>
    from .commands import COMMANDS
  File "/usr/lib/python3.10/site-packages/dephell/commands/__init__.py", line 2, in <module>
    from .discover import COMMANDS
  File "/usr/lib/python3.10/site-packages/dephell/commands/discover.py", line 86, in <module>
    module = import_module('.' + module_name, package=package)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/lib/python3.10/site-packages/dephell/commands/deps_add.py", line 7, in <module>
    from ..actions import get_resolver
  File "/usr/lib/python3.10/site-packages/dephell/actions/__init__.py", line 7, in <module>
    from ._converting import attach_deps
  File "/usr/lib/python3.10/site-packages/dephell/actions/_converting.py", line 7, in <module>
    from ..converters import CONVERTERS
  File "/usr/lib/python3.10/site-packages/dephell/converters/__init__.py", line 7, in <module>
    from .egginfo import EggInfoConverter
  File "/usr/lib/python3.10/site-packages/dephell/converters/egginfo.py", line 21, in <module>
    from .setuppy import SetupPyConverter
  File "/usr/lib/python3.10/site-packages/dephell/converters/setuppy.py", line 12, in <module>
    from dephell_setuptools import read_setup
  File "/usr/lib/python3.10/site-packages/dephell_setuptools/__init__.py", line 4, in <module>
    from ._cfg import CfgReader
  File "/usr/lib/python3.10/site-packages/dephell_setuptools/_cfg.py", line 8, in <module>
    from setuptools.config import ConfigMetadataHandler, ConfigOptionsHandler
ImportError: cannot import name 'ConfigMetadataHandler' from 'setuptools.config' (/usr/lib/python3.10/site-packages/setuptools/config/__init__.py)
==> ERROR: A failure occurred in prepare().
    Aborting...
error: failed to build 'streamdeck-ui-2.0.4-3': 
error: packages failed to build: streamdeck-ui-2.0.4-3
dhtseany commented 2 years ago

As I continue to investigate this further it appears that the method of building the python package on Arch Linux was deprecated which requires updates to the Arch Linux package. The problem I first reported is (mostly) Arch-specific and will be corrected shortly with a package upgrade. Thanks to the streamdeck-ui team for your hard work!

fuxx commented 2 years ago

Awesome :) Looking forward for your update! Thanks also for maintaining the AUR package :-)