frerich / clcache

A compiler cache for MSVC, much like ccache for gcc
Other
325 stars 83 forks source link

Syntax error (printTraceStatement) running on Windows 10 #351

Closed JodiTheTigger closed 5 years ago

JodiTheTigger commented 5 years ago

now when I type pip --help I get

Error processing line 1 of c:\python27\clcache.pth:

  Traceback (most recent call last):
    File "c:\python27\lib\site.py", line 152, in addpackage
      exec line
    File "<string>", line 1, in <module>
    File "c:\python27\lib\site-packages\clcache\__init__.py", line 1, in <module>
      from .__main__ import VERSION
    File "c:\python27\lib\site-packages\clcache\__main__.py", line 1022
      def printTraceStatement(msg: str) -> None:
                                 ^
  SyntaxError: invalid syntax

Remainder of file ignored

when I type clcache --help I get:

C:\Users\rmaxwell>clcache --help
Error processing line 1 of c:\python27\clcache.pth:

  Traceback (most recent call last):
    File "c:\python27\lib\site.py", line 152, in addpackage
      exec line
    File "<string>", line 1, in <module>
    File "c:\python27\lib\site-packages\clcache\__init__.py", line 1, in <module>
      from .__main__ import VERSION
    File "c:\python27\lib\site-packages\clcache\__main__.py", line 1022
      def printTraceStatement(msg: str) -> None:
                                 ^
  SyntaxError: invalid syntax

Remainder of file ignored
Traceback (most recent call last):
  File "C:\Python27\Scripts\clcache-script.py", line 11, in <module>
    load_entry_point('clcache==4.2.0', 'console_scripts', 'clcache')()
  File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 487, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 2728, in load_entry_point
    return ep.load()
  File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 2346, in load
    return self.resolve()
  File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 2352, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "c:\python27\lib\site-packages\clcache\__init__.py", line 1, in <module>
    from .__main__ import VERSION
  File "c:\python27\lib\site-packages\clcache\__main__.py", line 1022
    def printTraceStatement(msg: str) -> None:
                               ^
SyntaxError: invalid syntax
JodiTheTigger commented 5 years ago

When I uninstall clcache (pip uninstall clcache) the errors go away (but I don't have clcache :-/ )

frerich commented 5 years ago

@JodiTheTigger If I recall correctly, support for Python 2 was dropped with clcache 3.2.0, i.e. the previous release (clcache 3.1.1) might have been the last one which still works with Python 2.7. You can find clcache 3.1.1 here: https://github.com/frerich/clcache/releases/tag/v3.1.1