Menu

#3 Broken with setuptools==50.0.0

closed
None
blocker
bug
2021-06-25
2020-08-31
No
Collecting ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.9"
284  Downloading ruamel.yaml.clib-0.2.0.tar.gz (178 kB)
285    ERROR: Command errored out with exit status 1:
286     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-zqcl37iw/ruamel-yaml-clib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-zqcl37iw/ruamel-yaml-clib/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 /tmp/pip-pip-egg-info-qz5sk0qy
287         cwd: /tmp/pip-install-zqcl37iw/ruamel-yaml-clib/
288    Complete output (21 lines):
289    /usr/lib/python3.8/site-packages/_distutils_hack/__init__.py:30: UserWarning: Setuptools is replacing distutils.
290      warnings.warn("Setuptools is replacing distutils.")
291    Traceback (most recent call last):
292      File "<string>", line 1, in <module>
293      File "/tmp/pip-install-zqcl37iw/ruamel-yaml-clib/setup.py", line 960, in <module>
294        main()
295      File "/tmp/pip-install-zqcl37iw/ruamel-yaml-clib/setup.py", line 957, in main
296        setup(**kw)
297      File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
298        return distutils.core.setup(**attrs)
299      File "/usr/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 134, in setup
300        ok = dist.parse_command_line()
301      File "/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 484, in parse_command_line
302        args = self._parse_command_opts(parser, args)
303      File "/usr/lib/python3.8/site-packages/setuptools/dist.py", line 903, in _parse_command_opts
304        nargs = _Distribution._parse_command_opts(self, parser, args)
305      File "/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 547, in _parse_command_opts
306        raise DistutilsClassError(
307    distutils.errors.DistutilsClassError: command class <class 'setuptools.command.egg_info.egg_info'> must subclass Command
308    sys.argv ['/tmp/pip-install-zqcl37iw/ruamel-yaml-clib/setup.py', 'egg_info', '--egg-base', '/tmp/pip-pip-egg-info-qz5sk0qy']
309    test compiling test_ruamel_yaml

I can pin setuptools back to 49.6.0, where it worked, but I'd be worried about other packages breaking.

Discussion

  • Anthon van der Neut

    Thanks for reporting, I'll try to look into this, but it is going to be next month.

    Any particular reason you compile this from the tar.gz and don't use the pre-compiled wheel files?

     
  • Bryan Hundven

    Bryan Hundven - 2020-08-31

    My install commands (on alpine:latest):

    RUN curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | python3
    RUN python3 -m pip install virtualenv
    RUN python3 -m pip install ansible ansible-lint google-auth pycrypto pipenv yamllint
    
     
  • Bryan Hundven

    Bryan Hundven - 2020-08-31
    python3 -m pip install "setuptools>=49.6.0,<50.0.0" --force-reinstall
    

    works for now :)

     
  • Austin Macdonald

    Looks like there is already an upstream issue. https://github.com/pypa/setuptools/issues/2355

     
  • Austin Macdonald

    I was able to install correctly on amd64 (because it has a wheel) but failed on
    arm64
    ppc64le
    * s390x

     
  • Austin Macdonald

    The upstream issue used this project as a reproducer, and one of the maintainers traced it back to importing pip in the setup.py. This comment may be especially helpful here: https://github.com/pypa/setuptools/issues/2355#issuecomment-685159580

     
    • Anthon van der Neut

      Thanks for the link, I followed the advice there and was able to compile from .tar.gz using setuptools 50.0

       
  • Thomas Klausner

    Thomas Klausner - 2020-09-02

    I stumbled over this problem as well.
    The patch from the setuptools issue 2355 fixes this problem for me.

    The same problem occurs in ruamel-yaml (not "-clib").

     
  • Anthon van der Neut

    • status: open --> resolved
     
  • Anthon van der Neut

    This should be resolved in 0.2.1, if so please close the issue

     
  • Anthon van der Neut

    • status: resolved --> closed
     

Log in to post a comment.