travis-ci/travis-cookbooks — pull request #284 by dstufft (2014-03-18 06:06:23+00:00)
Title: Use python-build from pyenv instead of deadsnakes to install Python

* Removes all of the --with-system-site-packages except for ones where it actually makes sense
* Removes the use of various PPA's for installing Python and instead installs Python from pyenv's python-build
* Adds python-build to the system so that CI users can build their own projects

Right now this only installs the latest (at the time) for each of the 2.6, 2.7, 3.2, 3.3, and 3.4 series as well as the latest PyPy. They are available as both a point release, and a series release in the virtualenv directory. The idea here is that if someone wants to just test on "2.7" they can do ``python: 2.7``, if someone wants to test specifically on 2.7.5 and 2.7.3 they can do ``python: [2.7.5, 2.7.4]``. However in order to make that actually useful (in that there are more than just the latest available) ``ci_environment/python/attributes/default.rb`` will need to be updated to add additional versions of Python to build in the ``default['python']['pyenv']['pythons']`` list.

I figure the discussion about which particular versions of Python should be preinstalled can happen separately from this PR (although I'm happy to have it on this PR as well) but it takes roughly ~5 minutes per CPython release so for all the available 2.6, 2.7, 3.2, 3.3, and 3.4 releases it would take roughly 2 hours. I have some ideas about caching that on subsequent image builds to make it quicker but for right now I punted on that and just install the latest of each series and made it possible to install other specific ones if there's demand for a specific one.