david-caro / python-foreman

Small low level python wrapper around Foreman API
GNU General Public License v2.0
57 stars 37 forks source link

Doesn't work with python 2.7 #100

Open CollinLeishman opened 3 years ago

CollinLeishman commented 3 years ago
python setup.py sdist
Traceback (most recent call last):
  File "setup.py", line 35, in <module>
    'Programming Language :: Python :: 3.4',
  File "/Users/collinleishman/Downloads/python-foreman-0.4.19/env/lib/python2.7/site-packages/setuptools/__init__.py", line 162, in setup
    return distutils.core.setup(**attrs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/Users/collinleishman/Downloads/python-foreman-0.4.19/env/lib/python2.7/site-packages/setuptools/dist.py", line 448, in __init__
    k: v for k, v in attrs.items()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/Users/collinleishman/Downloads/python-foreman-0.4.19/env/lib/python2.7/site-packages/setuptools/dist.py", line 740, in finalize_options
    ep(self)
  File "/Users/collinleishman/Downloads/python-foreman-0.4.19/env/lib/python2.7/site-packages/setuptools/dist.py", line 747, in _finalize_setup_keywords
    ep.load()(self, ep.name, value)
  File "/Users/collinleishman/Downloads/python-foreman-0.4.19/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/Users/collinleishman/Downloads/python-foreman-0.4.19/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Users/collinleishman/Downloads/python-foreman-0.4.19/env/lib/python2.7/site-packages/autosemver/__init__.py", line 52
    def main(args: Optional[List[str]] = None) -> None:
                 ^
SyntaxError: invalid syntax

In setup.py, this should be the fix: setup_requires=['autosemver==0.5.5'],