opscode-cookbooks/python — pull request #52 by tjcravey (2013-07-27 00:20:04+00:00)
Title: [COOK-3401] Add Option to 'make altinstall' After Compiling Python From Source

When using the source install option by setting the attribute node['python']['install_method'] as documented in the readme to 'source' the compiled binaries are installed with 'make install' which overwrites the OS's system python. For yum-based Linux distributions, this can be problematic because yum on current versions of RHEL and CentOS has dependencies on Python 2.6. The current default Python installed when only setting the node['python']['install_method'] to source is Python 2.7.5.

Installing with 'make altinstall' instead of 'make install' allows the new version of Python to be installed alongside the already installed version. Further, installing setuptools and pip with the altinstall'd binary allows python packages installed with the python_pip resource in this cookbook to target this version and virtualenvs created with the python_virtualenv resource in this cookbook are able to target this version with the interpreter attribute.