zmwangx / caterpillar

Hardened HLS merger
MIT License
51 stars 9 forks source link

python3 SyntaxError #2

Closed lovecn closed 5 years ago

lovecn commented 5 years ago
λ caterpillar -h
Traceback (most recent call last):
  File "d:\python3\lib\runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "d:\python3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "D:\python3\Scripts\caterpillar.exe\__main__.py", line 5, in <module>
  File "d:\python3\lib\site-packages\caterpillar\caterpillar.py", line 46
    """
      ^
SyntaxError: invalid syntax
zmwangx commented 5 years ago

Line 46 of caterpillar.py is the end of an f-string [1], available starting from Python 3.6. It appears you're using Python 3.5 or earlier. README does say Python 3.6 or later required. You can check your Python version with python3 --version, or, using the pip with which you installed caterpillar-hls: pip --version.

I should probably add a version check to setup.py to fail outright on Python 3.5 or earlier.

[1] https://docs.python.org/3/whatsnew/3.6.html#whatsnew36-pep498

zmwangx commented 5 years ago

Of course, feel free to ask questions although the issue has been closed.

zmwangx commented 5 years ago

setup.py improved in 07ad4afce29aaab8e053c30d46d6f28692c5d009, and released in v1.0.1. With a not-too-outdated version of pip, it should now refuse to install caterpillar-hls outright on Python <3.6.