wheel: Latest wheel breaks with setuptools
Hi,
The latest wheel seems to break with setuptools in some weird and wonderful way. Downgrading to 0.38.1 seems to work fine.
:: Collecting pip<22.1
:: Downloading pip-22.0.4.tar.gz (2.1 MB)
:: Installing build dependencies: started
:: Installing build dependencies: finished with status 'error'
:: ERROR: Command errored out with exit status 1:
:: command: /root/snap/charmcraft/common/tmp3ttv087k/bin/python /root/snap/charmcraft/common/tmp3ttv087k/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /root/snap/charmcraft/common/pip-build-env-kzb85ngl/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel
:: cwd: None
:: Complete output (71 lines):
:: Collecting setuptools
:: Downloading setuptools-65.5.1.tar.gz (2.6 MB)
:: Getting requirements to build wheel: started
:: Getting requirements to build wheel: finished with status 'done'
:: Installing backend dependencies: started
:: Installing backend dependencies: finished with status 'error'
:: ERROR: Command errored out with exit status 1:
:: command: /root/snap/charmcraft/common/tmp3ttv087k/bin/python /root/snap/charmcraft/common/tmp3ttv087k/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /root/snap/charmcraft/common/pip-build-env-plg_blo8/normal --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- wheel
:: cwd: None
:: Complete output (59 lines):
:: Collecting wheel
:: Downloading wheel-0.38.2.tar.gz (66 kB)
:: ERROR: Command errored out with exit status 1:
:: command: /root/snap/charmcraft/common/tmp3ttv087k/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/root/snap/charmcraft/common/pip-install-h3frlauc/wheel/setup.py'"'"'; __file__='"'"'/root/snap/charmcraft/common/pip-install-h3frlauc/wheel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /root/snap/charmcraft/common/pip-install-h3frlauc/wheel/pip-egg-info
:: cwd: /root/snap/charmcraft/common/pip-install-h3frlauc/wheel/
:: Complete output (51 lines):
:: running egg_info
:: creating /root/snap/charmcraft/common/pip-install-h3frlauc/wheel/pip-egg-info/wheel.egg-info
:: writing /root/snap/charmcraft/common/pip-install-h3frlauc/wheel/pip-egg-info/wheel.egg-info/PKG-INFO
:: writing dependency_links to /root/snap/charmcraft/common/pip-install-h3frlauc/wheel/pip-egg-info/wheel.egg-info/dependency_links.txt
:: writing entry points to /root/snap/charmcraft/common/pip-install-h3frlauc/wheel/pip-egg-info/wheel.egg-info/entry_points.txt
:: writing requirements to /root/snap/charmcraft/common/pip-install-h3frlauc/wheel/pip-egg-info/wheel.egg-info/requires.txt
:: writing top-level names to /root/snap/charmcraft/common/pip-install-h3frlauc/wheel/pip-egg-info/wheel.egg-info/top_level.txt
:: writing manifest file '/root/snap/charmcraft/common/pip-install-h3frlauc/wheel/pip-egg-info/wheel.egg-info/SOURCES.txt'
:: Traceback (most recent call last):
:: File "<string>", line 1, in <module>
:: File "/root/snap/charmcraft/common/pip-install-h3frlauc/wheel/setup.py", line 5, in <module>
:: setup()
:: File "/root/snap/charmcraft/common/tmp3ttv087k/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
:: return distutils.core.setup(**attrs)
:: File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
:: dist.run_commands()
:: File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
:: self.run_command(cmd)
:: File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
:: cmd_obj.run()
:: File "/root/snap/charmcraft/common/tmp3ttv087k/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 296, in run
:: self.find_sources()
:: File "/root/snap/charmcraft/common/tmp3ttv087k/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 303, in find_sources
:: mm.run()
:: File "/root/snap/charmcraft/common/tmp3ttv087k/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 534, in run
:: self.add_defaults()
:: File "/root/snap/charmcraft/common/tmp3ttv087k/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 570, in add_defaults
:: sdist.add_defaults(self)
:: File "/usr/lib/python3.8/distutils/command/sdist.py", line 226, in add_defaults
:: self._add_defaults_python()
:: File "/root/snap/charmcraft/common/tmp3ttv087k/lib/python3.8/site-packages/setuptools/command/sdist.py", line 135, in _add_defaults_python
:: build_py = self.get_finalized_command('build_py')
:: File "/usr/lib/python3.8/distutils/cmd.py", line 299, in get_finalized_command
:: cmd_obj.ensure_finalized()
:: File "/usr/lib/python3.8/distutils/cmd.py", line 107, in ensure_finalized
:: self.finalize_options()
:: File "/root/snap/charmcraft/common/tmp3ttv087k/lib/python3.8/site-packages/setuptools/command/build_py.py", line 34, in finalize_options
:: orig.build_py.finalize_options(self)
:: File "/usr/lib/python3.8/distutils/command/build_py.py", line 43, in finalize_options
:: self.set_undefined_options('build',
:: File "/usr/lib/python3.8/distutils/cmd.py", line 286, in set_undefined_options
:: src_cmd_obj = self.distribution.get_command_obj(src_cmd)
:: File "/usr/lib/python3.8/distutils/dist.py", line 857, in get_command_obj
:: klass = self.get_command_class(command)
:: File "/root/snap/charmcraft/common/tmp3ttv087k/lib/python3.8/site-packages/setuptools/dist.py", line 834, in get_command_class
:: self.cmdclass[command] = cmdclass = ep.load()
:: File "/root/snap/charmcraft/common/tmp3ttv087k/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2443, in load
:: return self.resolve()
:: File "/root/snap/charmcraft/common/tmp3ttv087k/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2449, in resolve
:: module = __import__(self.module_name, fromlist=['__name__'], level=0)
:: ModuleNotFoundError: No module named 'setuptools.command.build'
:: ----------------------------------------
:: ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
:: ----------------------------------------
:: ERROR: Command errored out with exit status 1: /root/snap/charmcraft/common/tmp3ttv087k/bin/python /root/snap/charmcraft/common/tmp3ttv087k/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /root/snap/charmcraft/common/pip-build-env-plg_blo8/normal --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- wheel Check the logs for full command output.
:: ----------------------------------------
:: ERROR: Command errored out with exit status 1: /root/snap/charmcraft/common/tmp3ttv087k/bin/python /root/snap/charmcraft/common/tmp3ttv087k/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /root/snap/charmcraft/common/pip-build-env-kzb85ngl/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel Check the logs for full command output.
Any ideas what’s going on?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 21 (13 by maintainers)
So,
setuptools.command.buildwas introduced in setuptools v62.4.0. It looks like the required setuptools version is being downloaded, but somehow not used onsys.path. It’s rather bizarre. The only fix I can think of is ditchingsetup_requiresentirely and hoping it doesn’t cause issues elsewhere.As a side note, I checked if Ubuntu 18.04 (which should still be supported) can install wheel with
--no-binary wheel, and turns out it cannot:UnicodeEncodeError: 'ascii' codec can't encode characters in position 70-72: ordinal not in range(128). Oddly, nobody has been complaining about that.