{"action":"created","issue":{"url":"https://api.github.com/repos/scipy/scipy/issues/4474","labels_url":"https://api.github.com/repos/scipy/scipy/issues/4474/labels{/name}","comments_url":"https://api.github.com/repos/scipy/scipy/issues/4474/comments","events_url":"https://api.github.com/repos/scipy/scipy/issues/4474/events","html_url":"https://github.com/scipy/scipy/issues/4474","id":55655016,"number":4474,"title":"setup.py sys calls break in a Chef pip install","user":{"login":"malina-kirn","id":10038333,"avatar_url":"https://avatars.githubusercontent.com/u/10038333?v=3","gravatar_id":"","url":"https://api.github.com/users/malina-kirn","html_url":"https://github.com/malina-kirn","followers_url":"https://api.github.com/users/malina-kirn/followers","following_url":"https://api.github.com/users/malina-kirn/following{/other_user}","gists_url":"https://api.github.com/users/malina-kirn/gists{/gist_id}","starred_url":"https://api.github.com/users/malina-kirn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malina-kirn/subscriptions","organizations_url":"https://api.github.com/users/malina-kirn/orgs","repos_url":"https://api.github.com/users/malina-kirn/repos","events_url":"https://api.github.com/users/malina-kirn/events{/privacy}","received_events_url":"https://api.github.com/users/malina-kirn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/scipy/scipy/labels/Build%20issues","name":"Build issues","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-01-27T18:24:15Z","updated_at":"2015-01-27T21:26:02Z","closed_at":null,"body":"I'm installing python + various packages (including scipy) using the [python Chef recipe](https://supermarket.chef.io/cookbooks/python). I execute various pip install commands wrapped by the pip API provided by this Chef recipe.\r\n\r\nUnfortunately, the setup.py file from scipy Lines 217-219 makes calls to get system arguments in an attempt to determine whether or not the setup is being run through pip. In Chef, these checks don't appear to work and the install script enters the else conditional. The else conditional imports numpy on Line 237. Since I'm using pip to install everything, sometimes numpy is installed prior to scipy setup.py being called, sometimes it isn't. Consequently, I get intermittent installation failures when installing scipy.\r\n\r\nI don't fully understand the motivation behind the else block, but assume it's in there for a good reason.\r\n\r\nThe conditional statement in setup.py Lines 217-219 is terribly hacky. I don't know if there's a better way to determine if setup.py is being called from pip - the only similarly hacky workaround I can think of is to step through the process IDs of the current process and its parents to see if any of them contain pip. Yuck. Any thoughts on how to resolve this?"},"comment":{"url":"https://api.github.com/repos/scipy/scipy/issues/comments/71731185","html_url":"https://github.com/scipy/scipy/issues/4474#issuecomment-71731185","issue_url":"https://api.github.com/repos/scipy/scipy/issues/4474","id":71731185,"user":{"login":"malina-kirn","id":10038333,"avatar_url":"https://avatars.githubusercontent.com/u/10038333?v=3","gravatar_id":"","url":"https://api.github.com/users/malina-kirn","html_url":"https://github.com/malina-kirn","followers_url":"https://api.github.com/users/malina-kirn/followers","following_url":"https://api.github.com/users/malina-kirn/following{/other_user}","gists_url":"https://api.github.com/users/malina-kirn/gists{/gist_id}","starred_url":"https://api.github.com/users/malina-kirn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malina-kirn/subscriptions","organizations_url":"https://api.github.com/users/malina-kirn/orgs","repos_url":"https://api.github.com/users/malina-kirn/repos","events_url":"https://api.github.com/users/malina-kirn/events{/privacy}","received_events_url":"https://api.github.com/users/malina-kirn/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T21:26:02Z","updated_at":"2015-01-27T21:26:02Z","body":"Thanks @rgommers, happy to test if you like."}}