Skip to content

Instantly share code, notes, and snippets.

@dreampuf
Created November 25, 2015 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dreampuf/770a93e6fcf3aa6073ad to your computer and use it in GitHub Desktop.
Save dreampuf/770a93e6fcf3aa6073ad to your computer and use it in GitHub Desktop.
Build yourself Python 2.7 rpm package in RHEL5/CENTOS5
# 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