ipython/ipython — pull request #4975 by minrk (2014-01-31 20:12:13+00:00)
Title: setup.py changes for 2.0

- always compute 'requirements'
- use platform-specific dependencies (for wheels)
- add bdist_wheel subclass for getting the right tags and requirements
- whitelist components to be installed

The main point of this PR:

IPython source distributions are growing, due to the inclusion of many javascript dependencies. A large portion of these files are not actually used at install time, so a bdist (wheel) can be much smaller than an sdist. Currently, testing this PR shows a wheel being 3.3MB, while an sdist is 9MB.

This should be rebased after #4893 is merged, since it moves font-awesome.

We are currently only shipping manpages to usr/share, but the function that does this also claims to install examples, but it doesn't because the search path is wrong. I removed the failing code,
but I could just as easily fix it to actually install examples, if that is what we want it to do.

Still testing to do, to make sure the whitelist isn't too exclusive.

The ickiest part of the changes required is mangling `Requires-Dist`, for turning old-style requirements into PEP-345 `Requires-Dist`, which is the only way to specify platform-specific dependencies. Only wheels actually support PEP-345, so we have to specify these requirements in at least two places. This was the smallest change I could come up with, with the minimal code duplication.

Bonus wtf points for discovering that PKG_INFO is an instance of `email.Message` (?!)