[ 
https://issues.apache.org/jira/browse/MESOS-7255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15927860#comment-15927860
 ] 

Alexander Rukletsov commented on MESOS-7255:
--------------------------------------------

I've seen a related issue even after installing {{virtualenv}} for system 
python. First commit, that required virtual env to be built, didn't work from 
SourceTree app, but worked from terminal (can be some kind of python mismatch). 
Now when the virtual env is built, committing from SourceTree also works.

> New mesos-style.py linter behavior breaks commiting when virtualenv is not 
> installed
> ------------------------------------------------------------------------------------
>
>                 Key: MESOS-7255
>                 URL: https://issues.apache.org/jira/browse/MESOS-7255
>             Project: Mesos
>          Issue Type: Bug
>         Environment: macOS Sierra 10.12.3, default python 2.7.10
>            Reporter: Jan Schlicht
>
> Though {{mesos-style.py}} already had a function that checks and builds a 
> virtualenv, it always seemed to work when {{virtualenv}} was not installed 
> for the used python environment. The latest change breaks this behavior, 
> linting fails with:
> {noformat}
> $ ./support/mesos-style.py src/slave/slave.hpp
> Checking 1 C++ file
> Total errors found: 0
> Virtualenv for python linter not detected ... building
> Traceback (most recent call last):
>   File "/usr/local/bin/virtualenv", line 7, in <module>
>     from virtualenv import main
> ImportError: No module named virtualenv
> /Users/nfnt/Documents/mesos/src/cli_new/bootstrap: line 64: 
> /Users/nfnt/Documents/mesos/src/cli_new/.virtualenv/bin/activate: No such 
> file or directory
> {noformat}
> As this is a commit hook, a {{git commit}} is no longer possible (when not 
> using {{--no-verify}}).
> The default python 2.7 environment installed on macOS doesn't provide neither 
> {{pip}} nor {{virtualenv}}, i.e. {{virtualenv}} needs to be installed 
> manually, as documented in https://virtualenv.pypa.io/en/stable/installation/ 
> to resolve this. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to