ipython/ipython — pull request #7124 by takluyver (2014-12-06 22:48:24+00:00)
Title: Install kernelspecs in environments and find them there

With this change, we look in three types of location for kernelspecs:

1. Systemwide locations (`%PROGRAMDATA%` on Windows, `/usr` and `/usr/local` on Unix). This is for kernels installed with non-Python tools, like apt or executable installers.
2. Environment locations relative to sys.prefix. This is also where our Python machinery installs kernelspecs by default. In some cases where you're not using an environment, this will be the same as 1.
3. The per-user location inside $IPYTHONDIR. Our own machinery can install kernelspecs there with a flag.

The default is changed from installing for the user to installing for the environment. The `system` parameter for the install functions is replaced by a `user` parameter, which will require some kernel authors to make a change. An example for my bash_kernel is coming up. Ping @dsblank, @blink1073.

Supersedes #6966.