{"action":"created","issue":{"url":"https://api.github.com/repos/spotify/dh-virtualenv/issues/82","labels_url":"https://api.github.com/repos/spotify/dh-virtualenv/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/spotify/dh-virtualenv/issues/82/comments","events_url":"https://api.github.com/repos/spotify/dh-virtualenv/issues/82/events","html_url":"https://github.com/spotify/dh-virtualenv/issues/82","id":60661256,"number":82,"title":"Consider changing install location","user":{"login":"vilius-g","id":6215641,"avatar_url":"https://avatars.githubusercontent.com/u/6215641?v=3","gravatar_id":"","url":"https://api.github.com/users/vilius-g","html_url":"https://github.com/vilius-g","followers_url":"https://api.github.com/users/vilius-g/followers","following_url":"https://api.github.com/users/vilius-g/following{/other_user}","gists_url":"https://api.github.com/users/vilius-g/gists{/gist_id}","starred_url":"https://api.github.com/users/vilius-g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vilius-g/subscriptions","organizations_url":"https://api.github.com/users/vilius-g/orgs","repos_url":"https://api.github.com/users/vilius-g/repos","events_url":"https://api.github.com/users/vilius-g/events{/privacy}","received_events_url":"https://api.github.com/users/vilius-g/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-11T13:53:16Z","updated_at":"2015-07-19T21:25:08Z","closed_at":null,"body":"Currently `dh-virtualenv` installs packages into `/usr/share/python/$packagename`. As far as I understand `/usr/share/python` is for system python packages only and other packages should be installed somewhere else (`/usr/share/$packagename` maybe?).\r\n\r\nInstalling into `/usr/share/python` may break system python packages.\r\n\r\n##### For example, I have run into this issue:\r\nI have a `dh-virtualenv` based package that includes `gunicorn`. When it is installed, `python-minimal` package cannot be upgraded or reinstalled: \r\n```\r\nSetting up python-minimal (2.7.3-0ubuntu2.2) ...\r\ndpkg: error processing python-minimal (--configure):\r\n subprocess installed post-installation script returned error exit status 1\r\n```\r\nThe reason is this line in `python-minimal.postinst script`:\r\n```\r\npython2.7 -m compileall /usr/share/python/ >/dev/null\r\n```\r\nWhich fails with this:\r\n```\r\n[...]\r\nCompiling /usr/share/python/<my-package-name>/lib/python2.7/site-packages/gunicorn/workers/_gaiohttp.py ...\r\nSyntaxError: ('invalid syntax', ('/usr/share/python/<my-package-name>/lib/python2.7/site-packages/gunicorn/workers/_gaiohttp.py', 68, 26, '                yield from self.wsgi.close()\\n'))\r\n[...]\r\n```\r\nTo upgrade `python-minimal` package I need to remove my package first and then reinstall it after. Which is neither obvious nor convenient."},"comment":{"url":"https://api.github.com/repos/spotify/dh-virtualenv/issues/comments/122707905","html_url":"https://github.com/spotify/dh-virtualenv/issues/82#issuecomment-122707905","issue_url":"https://api.github.com/repos/spotify/dh-virtualenv/issues/82","id":122707905,"user":{"login":"jhermann","id":1068245,"avatar_url":"https://avatars.githubusercontent.com/u/1068245?v=3","gravatar_id":"","url":"https://api.github.com/users/jhermann","html_url":"https://github.com/jhermann","followers_url":"https://api.github.com/users/jhermann/followers","following_url":"https://api.github.com/users/jhermann/following{/other_user}","gists_url":"https://api.github.com/users/jhermann/gists{/gist_id}","starred_url":"https://api.github.com/users/jhermann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhermann/subscriptions","organizations_url":"https://api.github.com/users/jhermann/orgs","repos_url":"https://api.github.com/users/jhermann/repos","events_url":"https://api.github.com/users/jhermann/events{/privacy}","received_events_url":"https://api.github.com/users/jhermann/received_events","type":"User","site_admin":false},"created_at":"2015-07-19T21:25:08Z","updated_at":"2015-07-19T21:25:08Z","body":"You now have the *option* to change the installation root, so this could be closed unless the *default* is to be changed (the OP's problem is now easily solved)."}}