Closed tmsblgh closed 6 years ago
Thanks for the report. I presume you were not install the dependencies of scan-build
package. (That's what the error is about.) I would recommend to install it as it suggested in the readme file, since pip will ensure that dependencies are satisfied. (I would also suggest to use virtualenv or virtualenvwrapper instead of sudo
install any software on you machine.)
I tried like as your wrote:
Baloghs-MacBook-Pro:scan-build tamasbalogh$ make intercept_build_venv
# Create a virtual environment which can be used to run the build package.
virtualenv -p python2 intercept_build && \
. intercept_build/bin/activate && pip install -r ./req
Running virtualenv with interpreter /usr/local/bin/python2
New python executable in /Users/tamasbalogh/scan-build/intercept_build/bin/python2.7
Also creating executable in /Users/tamasbalogh/scan-build/intercept_build/bin/python
Installing setuptools, pip, wheel...done.
Collecting scan-build (from -r ./req (line 1))
Installing collected packages: scan-build
Successfully installed scan-build-2.0.9
Baloghs-MacBook-Pro:scan-build tamasbalogh$ source /Users/tamasbalogh/scan-build/intercept_build/bin/activate
(intercept_build) Baloghs-MacBook-Pro:scan-build tamasbalogh$ intercept-build
Traceback (most recent call last):
File "/Users/tamasbalogh/scan-build/intercept_build/bin/intercept-build", line 7, in <module>
from libscanbuild.intercept import intercept_build
File "/Users/tamasbalogh/scan-build/intercept_build/lib/python2.7/site-packages/libscanbuild/__init__.py", line 18, in <module>
from typing import List, Any, Dict, Callable # noqa: ignore=F401
ImportError: No module named typing
You are right, the dependency was not defined in the setup.py
. Fixed , now version 2.0.10
works as simple as pip install scan-build
.
For python3
, it seems that typing
is just a blank module that is left only for backwards compatibility and it's functionality is provided as part of the stdlib
. Source: https://pypi.org/project/typing/
I've encountered this issue after packaging for Arch Linux while python-typing
doesn't exist in the packages official repositories.
I think you should add a condition that will import the relevant stuff List, Any, Dict, Callable
only when running with a python2
interpreter. Installing typing
should be discouraged. This should be reopened.
Thanks for the update. Will work on it soon.
Fixed in version 2.0.14
I installed scan build after a clone from git repository and it was successful. But after that I tried to use it and I got an error:
What can be the problem?
System information: MacOS 10.13