frerich / clcache

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

pyinstaller fails to install clcache.py #311

Open kheaactua opened 6 years ago

kheaactua commented 6 years ago

I get the following error when attempting to install clcache with pyinstaller:

c:\tmp
(mypyenv) λ pyinstaller clcache.py
227 INFO: PyInstaller: 3.3.1
227 INFO: Python: 3.6.4
228 INFO: Platform: Windows-10-10.0.14393-SP0
230 INFO: wrote c:\tmp\clcache.spec
315 INFO: UPX is available.
Traceback (most recent call last):
  File "C:\Users\mrussell\AppData\Local\Programs\Python\Python36\Lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\mrussell\AppData\Local\Programs\Python\Python36\Lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\mrussell\python_envs\mypyenv\Scripts\pyinstaller.exe\__main__.py", line 9, in <module>
  File "c:\users\mrussell\python_envs\mypyenv\lib\site-packages\PyInstaller\__main__.py", line 94, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "c:\users\mrussell\python_envs\mypyenv\lib\site-packages\PyInstaller\__main__.py", line 46, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "c:\users\mrussell\python_envs\mypyenv\lib\site-packages\PyInstaller\building\build_main.py", line 791, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "c:\users\mrussell\python_envs\mypyenv\lib\site-packages\PyInstaller\building\build_main.py", line 737, in build

    exec(text, spec_namespace)
  File "<string>", line 16, in <module>
  File "c:\users\mrussell\python_envs\mypyenv\lib\site-packages\PyInstaller\building\build_main.py", line 162, in __init__
    raise ValueError("script '%s' not found" % script)
ValueError: script 'c:\tmp\clcache.py' not found

Same error in a Python 2.7.14 environment

chahn1138 commented 5 years ago

Was there ever any resolution here?

I am seeing a similar error.

izmmisha commented 5 years ago

attempting to install clcache with pyinstaller

To manually build executable of clcache you need pyinstaller/clcache_main.py script, I'm not sure that it available when you are using pip to install clcache.

So you need to clone git repo, then use python -mpip install . to install clcache from code and then you can use pyinstaller pyinstaller/clcache_main.py to get executable.

Or you can just download it at Release page https://github.com/frerich/clcache/releases/download/v4.2.0/clcache-4.2.0.zip