PeterJCLaw / srcomp-cli

Command line tools for interacting with the state of the Student Robotics Competition
https://github.com/PeterJCLaw/srcomp/wiki
0 stars 2 forks source link

Install failure under Python 3.7 #3

Closed PeterJCLaw closed 5 years ago

PeterJCLaw commented 5 years ago

On Python 3.7 we get an error when trying to install the required version of ruamel.yaml. I've included the stacktrace at the end for completeness, though the actual error is an incompatibility between ruamel.yaml's setup.py and distutils under Python 3.7 (I'm using 3.7.3).

It seems this got fixed via a side effect of https://bitbucket.org/ruamel/yaml/commits/ba539f8f4b02af1d3a5993e2b568c57c474e83ba, though I don't know which release that made it into.

Regardless, this means we need to upgrade beyond ruamel.yaml 0.14 (which has breaking API changes) or not use ruamel.yaml. Likely the better solution is to upgrade, any maybe to shield our usages behind some wrappers (I think we already wrap the actual yaml loading, so this shouldn't be too bad).

Collecting ruamel.yaml<0.14,>=0.13.0 (from sr.comp.cli==1.0.0)
  Using cached https://files.pythonhosted.org/packages/6d/00/061d150591d34065748857580735c4b42879a7dd3ebb75dde23671b60c26/ruamel.yaml-0.13.14.tar.gz
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Warning: 'keywords' should be a list, got type 'NoneType'
    sys.argv ['-c', 'egg_info', '--egg-base', 'pip-egg-info']
    test compiling test_ruamel_yaml
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-fk3mc0yx/ruamel.yaml/setup.py", line 854, in <module>
        main()
      File "/tmp/pip-install-fk3mc0yx/ruamel.yaml/setup.py", line 843, in main
        setup(**kw)
      File "/home/peter/.virtualenvs/srcomp37/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.7/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/home/peter/.virtualenvs/srcomp37/lib/python3.7/site-packages/setuptools/dist.py", line 444, in __init__
        k: v for k, v in attrs.items()
      File "/usr/lib/python3.7/distutils/dist.py", line 267, in __init__
        getattr(self.metadata, "set_" + key)(val)
      File "/usr/lib/python3.7/distutils/dist.py", line 1203, in set_keywords
        self.keywords = _ensure_list(value, 'keywords')
      File "/usr/lib/python3.7/distutils/dist.py", line 40, in _ensure_list
        value = list(value)
    TypeError: 'NoneType' object is not iterable
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-fk3mc0yx/ruamel.yaml/