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

distutils.errors.DistutilsClassError: command class <class 'setuptools.command.egg_info.egg_info'> must subclass Command #11

Closed
ddelange opened this issue Sep 3, 2020 · 1 comment

Comments

@ddelange
Copy link

ddelange commented Sep 3, 2020

As suggested in pypa/setuptools#2376 / https://github.com/pypa/setuptools/blob/master/CHANGES.rst#v5010, here an example issue of pypa/distutils breaking installation of a package.

refs:
pypa/setuptools#2355
anhaidgroup/py_stringmatching#64

$ python -c "from packaging.markers import default_environment; print(default_environment())"
{'implementation_name': 'cpython', 'implementation_version': '3.7.5', 'os_name': 'posix', 'platform_machine': 'x86_64', 'platform_release': '18.7.0', 'platform_system': 'Darwin', 'platform_version': 'Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64', 'python_full_version': '3.7.5', 'platform_python_implementation': 'CPython', 'python_version': '3.7', 'sys_platform': 'darwin'}
$ pip list | grep -e setuptools -e pip
pip                             20.2.2
setuptools                      50.1.0
$ SETUPTOOLS_USE_DISTUTILS=local pip install py-stringmatching
Looking in indexes: https://travis:****@pypi.scoutbee.co/repository/data/simple/, https://pypi.org/simple
Collecting py-stringmatching
  Using cached py_stringmatching-0.4.1.tar.gz (646 kB)
    ERROR: Command errored out with exit status 1:
     command: /Users/david.de-lange/.pyenv/versions/vv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/zf/tbwgf1fx1dvgvmvwdn7_vg3w0000gn/T/pip-install-ov4impok/py-stringmatching/setup.py'"'"'; __file__='"'"'/private/var/folders/zf/tbwgf1fx1dvgvmvwdn7_vg3w0000gn/T/pip-install-ov4impok/py-stringmatching/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 /private/var/folders/zf/tbwgf1fx1dvgvmvwdn7_vg3w0000gn/T/pip-pip-egg-info-esg39fop
         cwd: /private/var/folders/zf/tbwgf1fx1dvgvmvwdn7_vg3w0000gn/T/pip-install-ov4impok/py-stringmatching/
    Complete output (17 lines):
    /Users/david.de-lange/.pyenv/versions/vv/lib/python3.7/site-packages/_distutils_hack/__init__.py:30: UserWarning: Setuptools is replacing distutils.
      warnings.warn("Setuptools is replacing distutils.")
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/zf/tbwgf1fx1dvgvmvwdn7_vg3w0000gn/T/pip-install-ov4impok/py-stringmatching/setup.py", line 144, in <module>
        zip_safe=False
      File "/Users/david.de-lange/.pyenv/versions/vv/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/Users/david.de-lange/.pyenv/versions/vv/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 134, in setup
        ok = dist.parse_command_line()
      File "/Users/david.de-lange/.pyenv/versions/vv/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 484, in parse_command_line
        args = self._parse_command_opts(parser, args)
      File "/Users/david.de-lange/.pyenv/versions/vv/lib/python3.7/site-packages/setuptools/dist.py", line 903, in _parse_command_opts
        nargs = _Distribution._parse_command_opts(self, parser, args)
      File "/Users/david.de-lange/.pyenv/versions/vv/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 548, in _parse_command_opts
        "command class %s must subclass Command" % cmd_class)
    distutils.errors.DistutilsClassError: command class <class 'setuptools.command.egg_info.egg_info'> must subclass Command
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
@jaraco
Copy link
Member

jaraco commented Sep 4, 2020

Thanks for the report. In this case, the issue lies entirely with Setuptools and Setuptools' adoption of distutils, so I'm going to close this in favor of pypa/setuptools#2355.

@jaraco jaraco closed this as completed Sep 4, 2020
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

No branches or pull requests

2 participants