{"action":"created","issue":{"url":"https://api.github.com/repos/sourcegraph/srclib-python/issues/19","labels_url":"https://api.github.com/repos/sourcegraph/srclib-python/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/sourcegraph/srclib-python/issues/19/comments","events_url":"https://api.github.com/repos/sourcegraph/srclib-python/issues/19/events","html_url":"https://github.com/sourcegraph/srclib-python/pull/19","id":61155723,"number":19,"title":"WIP. Use venv for deps","user":{"login":"MaikuMori","id":28470,"avatar_url":"https://avatars.githubusercontent.com/u/28470?v=3","gravatar_id":"","url":"https://api.github.com/users/MaikuMori","html_url":"https://github.com/MaikuMori","followers_url":"https://api.github.com/users/MaikuMori/followers","following_url":"https://api.github.com/users/MaikuMori/following{/other_user}","gists_url":"https://api.github.com/users/MaikuMori/gists{/gist_id}","starred_url":"https://api.github.com/users/MaikuMori/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaikuMori/subscriptions","organizations_url":"https://api.github.com/users/MaikuMori/orgs","repos_url":"https://api.github.com/users/MaikuMori/repos","events_url":"https://api.github.com/users/MaikuMori/events{/privacy}","received_events_url":"https://api.github.com/users/MaikuMori/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-13T17:43:40Z","updated_at":"2015-03-16T22:24:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sourcegraph/srclib-python/pulls/19","html_url":"https://github.com/sourcegraph/srclib-python/pull/19","diff_url":"https://github.com/sourcegraph/srclib-python/pull/19.diff","patch_url":"https://github.com/sourcegraph/srclib-python/pull/19.patch"},"body":"This should fix #18.\r\n\r\n`getVENVBinPath` is a bit misleading name as it will return `\"\"` when ran inside docker container. I didn't want to complicate docker setup with virutalenv since it's pointless there."},"comment":{"url":"https://api.github.com/repos/sourcegraph/srclib-python/issues/comments/81966115","html_url":"https://github.com/sourcegraph/srclib-python/pull/19#issuecomment-81966115","issue_url":"https://api.github.com/repos/sourcegraph/srclib-python/issues/19","id":81966115,"user":{"login":"samertm","id":969377,"avatar_url":"https://avatars.githubusercontent.com/u/969377?v=3","gravatar_id":"","url":"https://api.github.com/users/samertm","html_url":"https://github.com/samertm","followers_url":"https://api.github.com/users/samertm/followers","following_url":"https://api.github.com/users/samertm/following{/other_user}","gists_url":"https://api.github.com/users/samertm/gists{/gist_id}","starred_url":"https://api.github.com/users/samertm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samertm/subscriptions","organizations_url":"https://api.github.com/users/samertm/orgs","repos_url":"https://api.github.com/users/samertm/repos","events_url":"https://api.github.com/users/samertm/events{/privacy}","received_events_url":"https://api.github.com/users/samertm/received_events","type":"User","site_admin":false},"created_at":"2015-03-16T22:24:28Z","updated_at":"2015-03-16T22:24:28Z","body":"On Mon, Mar 16, 2015 at 3:03 PM, Miks Kalnins <notifications@github.com>\nwrote:\n\n>\n>    - Do the same thing as in docker mode, install package in toolchains\n>    virtualenv. Problem is that if user has multiple python projects it will\n>    turn into garbage bin with possible conflicts between packages, constant\n>    package reinstallation and other unforeseeable bugs. This is probably the\n>    simples solution.\n>\n> I don't think we should do this.\n\n>\n>    - Try to figure out which virtualenv is active from environment\n>    variables and use that (or systems if no virtualenv is active). I sorta\n>    like this solution except I wouldn't want to pollute it with grapher python\n>    package (to my understanding it has to be installed and run in same\n>    environment as package which is analyzed and it's deps). Another bonus here\n>    is that python project deps are quite often out of sync with\n>    requirements.txt while you're developing, this would pickup any new\n>    installed dependency instantly)\n>\n> I think the best case scenario would be if we could get this to work, but\nI don't know much about virtualenv. Is the issue that srclib-python and the\napp it's analyzing both need their *own* virtualenvs? We don't want to\npollute the user's requirements.txt or their other virtualenv configs.\n\n>\n>    - Make new virtual env in say .srclib-cache dir (or the new store\n>    @samertm <https://github.com/samertm> is working on) install\n>    package/deps + grapher + pydep in that virtualenv and run from there. Maybe\n>    the best solution at cost of setup time (install packages, keep the in sync\n>    with changes in requirements.txt)\n>\n> If we can't do the second point, I think this is the second best. For this\nto work, the should be a command like \"src toolchain temp-dir\n<toolchain-path>\" that gives you back a full path to a temp directory that\nyou could write to, like \"/home/<user>/.srclib/tmp/<toolchain-path>/\", and\nthen srclib-python would create the virtualenv it needs to analyze the app.\n\nWhat do you think?\n"}}