{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/11086","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/11086/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/11086/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/11086/events","html_url":"https://github.com/NixOS/nixpkgs/pull/11086","id":117329675,"number":11086,"title":"buildPythonPackage: use wheels internally","user":{"login":"domenkozar","id":126339,"avatar_url":"https://avatars.githubusercontent.com/u/126339?v=3","gravatar_id":"","url":"https://api.github.com/users/domenkozar","html_url":"https://github.com/domenkozar","followers_url":"https://api.github.com/users/domenkozar/followers","following_url":"https://api.github.com/users/domenkozar/following{/other_user}","gists_url":"https://api.github.com/users/domenkozar/gists{/gist_id}","starred_url":"https://api.github.com/users/domenkozar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenkozar/subscriptions","organizations_url":"https://api.github.com/users/domenkozar/orgs","repos_url":"https://api.github.com/users/domenkozar/repos","events_url":"https://api.github.com/users/domenkozar/events{/privacy}","received_events_url":"https://api.github.com/users/domenkozar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/feedback-requested","name":"feedback-requested","color":"f7c6c7"},{"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/python","name":"python","color":"0b02e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-17T10:53:13Z","updated_at":"2015-11-17T16:21:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/11086","html_url":"https://github.com/NixOS/nixpkgs/pull/11086","diff_url":"https://github.com/NixOS/nixpkgs/pull/11086.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/11086.patch"},"body":"Wheels [PEP427](https://www.python.org/dev/peps/pep-0427/) are the new python packaging binary format. We should use wheels as that's where currently python packaging development is focused on and it's considered best practice toolchain. Wheels deprecate eggs.\r\n\r\nChanges:\r\n- pypy installs packages to $out/site-packages by default and we now respect that default\r\n- introduce `bootstrapped-pip` package that includes a hand crafted pip+wheel packages needed in `buildPythonPackage`\r\n- remove our ugly hack with inserting `setuptools` before `distutils` and use exact code that pip uses\r\n- remove support for `.pth` recursive loader. This didn't work for last 2 years, it has a major startup time impact on binaries and it's not needed since all python interpreters now use `setup-hook` to set `$PYTHONPATH`\r\n- deprecated `pythonPath` argument to `buildPythonPackage` since it's essentially the same as `propagatedBuildInputs`\r\n- replace setup.py build/install commands with wheel equivalent\r\n\r\nTODO:\r\n\r\n- [ ] submit a PR upstream for the `pip install --prefix=` patch\r\n- [ ] support `setupPyBuildFlags`\r\n- [ ] write a script that raises a conflict if two or more versions of the same package are in $PYTHONPATH\r\n- [ ] [data_files are not installed at correct directory](https://bitbucket.org/pypa/wheel/issues/120/bdist_wheel-creates-a-wheel-that-installs) \r\n- [ ] test pypy support\r\n- [ ] test setuptools namespaces support https://github.com/NixOS/nixpkgs/issues/2412\r\n- [ ] [make sure hydra builds all packages successfully](http://hydra.nixos.org/jobset/nixpkgs/pr-11086)\r\n- [ ] update documentation\r\n\r\ncc @garbas @offlinehacker @FRidh @cillianderoiste @copumpkin @madjar @johbo @chaoflow @datakurre @adnelson \r\n\r\nFixes https://github.com/NixOS/nixpkgs/issues/329"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/157419200","html_url":"https://github.com/NixOS/nixpkgs/pull/11086#issuecomment-157419200","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/11086","id":157419200,"user":{"login":"johbo","id":117805,"avatar_url":"https://avatars.githubusercontent.com/u/117805?v=3","gravatar_id":"","url":"https://api.github.com/users/johbo","html_url":"https://github.com/johbo","followers_url":"https://api.github.com/users/johbo/followers","following_url":"https://api.github.com/users/johbo/following{/other_user}","gists_url":"https://api.github.com/users/johbo/gists{/gist_id}","starred_url":"https://api.github.com/users/johbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johbo/subscriptions","organizations_url":"https://api.github.com/users/johbo/orgs","repos_url":"https://api.github.com/users/johbo/repos","events_url":"https://api.github.com/users/johbo/events{/privacy}","received_events_url":"https://api.github.com/users/johbo/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T16:21:10Z","updated_at":"2015-11-17T16:21:10Z","body":"One small suggestion for the message to add \"this\" after \"Usually\":\r\n\r\n```\r\nsee above. Usually this happens if two\r\n```"}}