{"action":"created","issue":{"url":"https://api.github.com/repos/Valloric/ycmd/issues/488","repository_url":"https://api.github.com/repos/Valloric/ycmd","labels_url":"https://api.github.com/repos/Valloric/ycmd/issues/488/labels{/name}","comments_url":"https://api.github.com/repos/Valloric/ycmd/issues/488/comments","events_url":"https://api.github.com/repos/Valloric/ycmd/issues/488/events","html_url":"https://github.com/Valloric/ycmd/pull/488","id":154525313,"number":488,"title":"[RFC] Handle Python virtual environment in build script","user":{"login":"micbou","id":10026824,"avatar_url":"https://avatars.githubusercontent.com/u/10026824?v=3","gravatar_id":"","url":"https://api.github.com/users/micbou","html_url":"https://github.com/micbou","followers_url":"https://api.github.com/users/micbou/followers","following_url":"https://api.github.com/users/micbou/following{/other_user}","gists_url":"https://api.github.com/users/micbou/gists{/gist_id}","starred_url":"https://api.github.com/users/micbou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micbou/subscriptions","organizations_url":"https://api.github.com/users/micbou/orgs","repos_url":"https://api.github.com/users/micbou/repos","events_url":"https://api.github.com/users/micbou/events{/privacy}","received_events_url":"https://api.github.com/users/micbou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-12T16:26:05Z","updated_at":"2016-05-12T19:23:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Valloric/ycmd/pulls/488","html_url":"https://github.com/Valloric/ycmd/pull/488","diff_url":"https://github.com/Valloric/ycmd/pull/488.diff","patch_url":"https://github.com/Valloric/ycmd/pull/488.patch"},"body":"We can't use `sys.exec_prefix` to find the Python libraries when running the `build.py` script in a virtual environment (like `pyvenv` or `virtualenv`) because the virtual environment doesn't contain the libraries.\r\nWe need to find them from the Python used to create the virtual environment. This is done by looking at the `LIBDIR` and `INCLUDEDIR` variables on Unix platforms and the `INCLUDEPY` variable on Windows from the `distutils.sysconfig` module. \r\n\r\nFixes #486.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"35\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/valloric/ycmd/488)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/Valloric/ycmd/issues/comments/218859465","html_url":"https://github.com/Valloric/ycmd/pull/488#issuecomment-218859465","issue_url":"https://api.github.com/repos/Valloric/ycmd/issues/488","id":218859465,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2016-05-12T19:23:12Z","updated_at":"2016-05-12T19:23:12Z","body":"\n[![Coverage Status](https://coveralls.io/builds/6157396/badge)](https://coveralls.io/builds/6157396)\n\nCoverage remained the same at 84.957% when pulling **bb5e1e16b2ea6851a25cc63add4ea75fffaf25a3 on micbou:find-python-libs-virtualenv** into **b3f654946a00e32dd96547b14259bde2b28fd605 on Valloric:master**.\n"}}