Created
November 25, 2015 09:04
-
-
Save dreampuf/770a93e6fcf3aa6073ad to your computer and use it in GitHub Desktop.
Build yourself Python 2.7 rpm package in RHEL5/CENTOS5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. install pyenv and with it download python 2.7.10 | |
git clone https://github.com/yyuu/pyenv.git ~/.pyenv | |
export PYENV_ROOT="$HOME/.pyenv" | |
export PATH="$PYENV_ROOT/bin:$PATH" | |
eval "$(pyenv init -)" | |
exec $SHELL | |
pyenv install 2.7.10 | |
pyenv rehash | |
# 2. install rvm and fpm gem package | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
\curl -sSL https://get.rvm.io | bash -s stable | |
rvm use stable | |
gem install fpm | |
# 3. build the rpm package | |
fpm -s dir -t rpm -C ~/.pyenv/versions/2.7.10 -v 2.7.10 -n Python --prefix /usr/local bin include lib share |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment