Last active
June 3, 2019 13:51
-
-
Save dropwhile/7744519 to your computer and use it in GitHub Desktop.
Revisions
-
cactus revised this gist
Jun 30, 2018 . 2 changed files with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -97,6 +97,9 @@ fpm -s dir -t rpm -n python${PY_SHORT} -v ${BUILD_VER} -C ${INSTALL_DIR} \ --directories=/usr/local/include/python${PY_BUILD_VER}/ \ usr/local # move rpm to download dir mv python${PY_SHORT}*.rpm ../ # note: after install, you may need to do the following, depending no use of --enable-shared in the configure step: # echo '/usr/local/lib' > /etc/ld.so.conf.d/usr-local.conf # ldconfig -v This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -100,6 +100,9 @@ fpm -s dir -t rpm -n python${PY_SHORT} -v ${BUILD_VER} -C ${INSTALL_DIR} \ --directories=/usr/local/lib/python${PY_BUILD_VER}/ \ --directories=/usr/local/include/python${PY_BUILD_VER}m/ \ usr/local # move rpm to download dir mv python${PY_SHORT}*.rpm ../ # note: after install, you may need to do the following, depending no use of --enable-shared in the configure step: # echo '/usr/local/lib' > /etc/ld.so.conf.d/usr-local.conf -
cactus revised this gist
Jun 30, 2018 . 2 changed files with 41 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,32 @@ ##### Configurable options BUILD_VER=2.7.14 # strip symbols to slightly reduce runtime memory footprint STRIP="yes" # use altinstall to NOT symlink python and python2 to the python2.7 executable ALTINSTALL="yes" # build as user, requires configured sudo (for yum and fpm gem install). # if not "yes", then build should be done as root USE_SUDO="yes" ##### Build section PY_BUILD_VER="${BUILD_VER%.*}" PY_SHORT="${PY_BUILD_VER//.}" INSTALL_DIR=/tmp/pybuild2x/installdir BUILD_DIR=/tmp/pybuild2x/download if [ "$USE_SUDO" = "yes" ]; then CMD_SUDO="sudo" else if [ "$(id -u)" -ne 0 ] || [ "$(whoami)" != root ]; then printf "%s\n" "USE_SUDO != 'yes', so must be run as root. aborting." exit 1 fi CMD_SUDO="" fi mkdir -p "${INSTALL_DIR}" "${BUILD_DIR}" cd "${BUILD_DIR}" curl -LO http://python.org/ftp/python/${BUILD_VER}/Python-${BUILD_VER}.tgz @@ -19,10 +35,10 @@ tar xf Python-${BUILD_VER}.tgz cd Python-${BUILD_VER} # install compilers, devtools $CMD_SUDO yum groupinstall -y "development tools" # install build deps $CMD_SUDO yum -y install \ bzip2-devel \ db4-devel \ expat-devel \ @@ -36,8 +52,8 @@ yum -y install \ zlib-devel # install fpm $CMD_SUDO yum install ruby ruby-devel rubygems $CMD_SUDO gem install fpm # note: if you want multiple minor version of python on the system, eg system python is 2.7.5 and you want 2.7.13, # then remove --enable-shared from the configure line below. This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,31 @@ ##### Configurable options BUILD_VER=3.7.0 # strip symbols to slightly reduce runtime memory footprint STRIP="yes" # use altinstall to NOT symlink python3 to the python3.x executable (note: does not symlink python->python3.x either way) ALTINSTALL="no" # build as user, requires sudo (for yum and fpm gem install) USE_SUDO="yes" ##### Build section PY_BUILD_VER="${BUILD_VER%.*}" PY_SHORT="${PY_BUILD_VER//.}" INSTALL_DIR=/tmp/pybuild/installdir BUILD_DIR=/tmp/pybuild/download if [ "$USE_SUDO" = "yes" ]; then CMD_SUDO="sudo" else if [ "$(id -u)" -ne 0 ] || [ "$(whoami)" != root ]; then printf "%s\n" "USE_SUDO != 'yes', so must be run as root. aborting." exit 1 fi CMD_SUDO="" fi mkdir -p "${INSTALL_DIR}" "${BUILD_DIR}" cd "${BUILD_DIR}" curl -LO http://python.org/ftp/python/${BUILD_VER}/Python-${BUILD_VER}.tgz @@ -18,10 +34,10 @@ tar xf Python-${BUILD_VER}.tgz cd Python-${BUILD_VER} # install compilers, devtools $CMD_SUDO yum groupinstall -y "development tools" # install build deps $CMD_SUDO yum -y install \ bzip2-devel \ db4-devel \ expat-devel \ @@ -35,8 +51,8 @@ yum -y install \ zlib-devel # install fpm $CMD_SUDO yum install ruby ruby-devel rubygems $CMD_SUDO gem install fpm # note: if you want multiple minor version of python on the system, eg system # python is 2.7.5 and you want 2.7.13, then remove --enable-shared from the -
cactus revised this gist
Jun 30, 2018 . No changes.There are no files selected for viewing
-
cactus revised this gist
Jun 30, 2018 . 2 changed files with 45 additions and 21 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,12 @@ ALTINSTALL="yes" PY_BUILD_VER="${BUILD_VER%.*}" PY_SHORT="${PY_BUILD_VER//.}" INSTALL_DIR=/tmp/pybuild2x/installdir BUILD_DIR=/tmp/pybuild2x/download mkdir -p "${INSTALL_DIR}" "${BUILD_DIR}" cd "${BUILD_DIR}" curl -LO http://python.org/ftp/python/${BUILD_VER}/Python-${BUILD_VER}.tgz tar xf Python-${BUILD_VER}.tgz @@ -22,13 +27,18 @@ yum -y install \ db4-devel \ expat-devel \ gdbm-devel \ libffi-devel \ ncurses-devel \ openssl-devel \ readline-devel \ sqlite-devel \ xz-devel \ zlib-devel # install fpm yum install ruby ruby-devel rubygems gem install fpm # note: if you want multiple minor version of python on the system, eg system python is 2.7.5 and you want 2.7.13, # then remove --enable-shared from the configure line below. # this will remove the ability to load python as a shared library (include python in other apps), but also avoides python @@ -40,26 +50,27 @@ yum -y install \ make -j2 if [ "$ALTINSTALL" = "yes" ]; then make altinstall DESTDIR="${INSTALL_DIR}" else make install DESTDIR="${INSTALL_DIR}" fi if [ "$STRIP" = "yes" ]; then for f in /tmp/installdir/usr/local/lib/libpython*; do [ ! -L "$f" ] && chmod 755 "$f" && strip "$f" done strip ${INSTALL_DIR}/usr/local/bin/python${PY_BUILD_VER} strip ${INSTALL_DIR}/usr/local/bin/python${PY_BUILD_VER}m fi echo '/sbin/ldconfig' > ${INSTALL_DIR}/run-ldconfig.sh fpm -s dir -t rpm -n python${PY_SHORT} -v ${BUILD_VER} -C ${INSTALL_DIR} \ --after-install /tmp/installdir/run-ldconfig.sh \ -d 'bzip2' \ -d 'db4' \ -d 'expat' \ -d 'gdbm' \ -d 'libffi' \ -d 'ncurses' \ -d 'openssl' \ -d 'readline' \ This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ BUILD_VER=3.7.0 # strip symbols to slightly reduce runtime memory footprint STRIP="yes" # use altinstall to NOT symlink python3 to the python3.x executable (note: does not symlink python->python3.x either way) @@ -7,7 +7,11 @@ ALTINSTALL="no" PY_BUILD_VER="${BUILD_VER%.*}" PY_SHORT="${PY_BUILD_VER//.}" INSTALL_DIR=/tmp/pybuild/installdir BUILD_DIR=/tmp/pybuild/download mkdir -p "${INSTALL_DIR}" "${BUILD_DIR}" cd "${BUILD_DIR}" curl -LO http://python.org/ftp/python/${BUILD_VER}/Python-${BUILD_VER}.tgz tar xf Python-${BUILD_VER}.tgz @@ -22,46 +26,55 @@ yum -y install \ db4-devel \ expat-devel \ gdbm-devel \ libffi-devel \ ncurses-devel \ openssl-devel \ readline-devel \ sqlite-devel \ xz-devel \ zlib-devel # install fpm yum install ruby ruby-devel rubygems gem install fpm # note: if you want multiple minor version of python on the system, eg system # python is 2.7.5 and you want 2.7.13, then remove --enable-shared from the # configure line below. # this will remove the ability to load python as a shared library (include # python in other apps), but also avoides python # loading the wrong minor # library version depending on your libary path (and avoids messing with the # system python) ./configure --prefix=/usr/local --enable-optimizations --enable-ipv6 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" # ./configure --prefix=/usr/local --enable-optimizations --enable-ipv6 LDFLAGS="-Wl,-rpath /usr/local/lib" # build make -j2 if [ "$ALTINSTALL" = "yes" ]; then make altinstall DESTDIR="${INSTALL_DIR}" else make install DESTDIR="${INSTALL_DIR}" fi if [ "$STRIP" = "yes" ]; then for f in ${INSTALL_DIR}/usr/local/lib/libpython*; do [ ! -L "$f" ] && chmod 755 "$f" && strip "$f" done strip ${INSTALL_DIR}/usr/local/bin/python${PY_BUILD_VER} strip ${INSTALL_DIR}/usr/local/bin/python${PY_BUILD_VER}m fi echo '/sbin/ldconfig' > ${INSTALL_DIR}/run-ldconfig.sh fpm -s dir -t rpm -n python${PY_SHORT} -v ${BUILD_VER} -C ${INSTALL_DIR} \ --after-install ${INSTALL_DIR}/run-ldconfig.sh \ --provides "python(abi) = ${PY_SHORT}" \ --provides "python${PY_SHORT} = ${BUILD_VER}" \ -d 'bzip2' \ -d 'db4' \ -d 'expat' \ -d 'gdbm' \ -d 'libffi' \ -d 'ncurses' \ -d 'openssl' \ -d 'readline' \ -
cactus revised this gist
Dec 29, 2017 . 2 changed files with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -47,7 +47,7 @@ fi if [ "$STRIP" = "yes" ]; then for f in /tmp/installdir/usr/local/lib/libpython*; do [ ! -L "$f" ] && chmod 755 "$f" && strip "$f" done strip /tmp/installdir/usr/local/bin/python${PY_BUILD_VER} strip /tmp/installdir/usr/local/bin/python${PY_BUILD_VER}m This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ BUILD_VER=3.6.4 # strip symbols to slightly reduce runtime memory footprint STRIP="yes" # use altinstall to NOT symlink python3 to the python3.x executable (note: does not symlink python->python3.x either way) @@ -33,8 +33,8 @@ yum -y install \ # then remove --enable-shared from the configure line below. # this will remove the ability to load python as a shared library (include python in other apps), but also avoides python # loading the wrong minor library version depending on your libary path (and avoids messing with the system python) ./configure --prefix=/usr/local --enable-optimizations --enable-ipv6 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" # ./configure --prefix=/usr/local --enable-optimizations --enable-ipv6 LDFLAGS="-Wl,-rpath /usr/local/lib" # build make -j2 @@ -47,7 +47,7 @@ fi if [ "$STRIP" = "yes" ]; then for f in /tmp/installdir/usr/local/lib/libpython*; do [ ! -L "$f" ] && chmod 755 "$f" && strip "$f" done strip /tmp/installdir/usr/local/bin/python${PY_BUILD_VER} strip /tmp/installdir/usr/local/bin/python${PY_BUILD_VER}m -
cactus revised this gist
Oct 26, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ BUILD_VER=3.6.3 # strip symbols to slightly reduce runtime memory footprint STRIP="yes" # use altinstall to NOT symlink python3 to the python3.x executable (note: does not symlink python->python3.x either way) ALTINSTALL="no" PY_BUILD_VER="${BUILD_VER%.*}" PY_SHORT="${PY_BUILD_VER//.}" -
cactus revised this gist
Oct 26, 2017 . 2 changed files with 28 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,9 @@ BUILD_VER=2.7.14 # strip symbols to slightly reduce runtime memory footprint STRIP="yes" # use altinstall to NOT symlink python and python2 to the python2.7 executable ALTINSTALL="yes" PY_BUILD_VER="${BUILD_VER%.*}" PY_SHORT="${PY_BUILD_VER//.}" @@ -34,8 +39,19 @@ yum -y install \ # build make -j2 if [ "$ALTINSTALL" = "yes" ]; then make altinstall DESTDIR=/tmp/installdir else make install DESTDIR=/tmp/installdir fi if [ "$STRIP" = "yes" ]; then for f in /tmp/installdir/usr/local/lib/libpython*; do [ ! -L "$f" ] && strip "$f" done strip /tmp/installdir/usr/local/bin/python${PY_BUILD_VER} strip /tmp/installdir/usr/local/bin/python${PY_BUILD_VER}m fi echo '/sbin/ldconfig' > /tmp/installdir/run-ldconfig.sh fpm -s dir -t rpm -n python${PY_SHORT} -v ${BUILD_VER} -C /tmp/installdir \ This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,11 @@ BUILD_VER=3.6.3 # strip symbols to slightly reduce runtime memory footprint STRIP="yes" # use altinstall to NOT symlink python to the python3 executable ALTINSTALL="yes" PY_BUILD_VER="${BUILD_VER%.*}" PY_SHORT="${PY_BUILD_VER//.}" mkdir download /tmp/installdir; cd download; curl -LO http://python.org/ftp/python/${BUILD_VER}/Python-${BUILD_VER}.tgz @@ -35,11 +39,12 @@ yum -y install \ # build make -j2 if [ "$ALTINSTALL" = "yes" ]; then make altinstall DESTDIR=/tmp/installdir else make install DESTDIR=/tmp/installdir fi if [ "$STRIP" = "yes" ]; then for f in /tmp/installdir/usr/local/lib/libpython*; do [ ! -L "$f" ] && strip "$f" -
cactus revised this gist
Oct 26, 2017 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ BUILD_VER=2.7.14 PY_BUILD_VER="${BUILD_VER%.*}" PY_SHORT="${PY_BUILD_VER//.}" @@ -28,7 +28,8 @@ yum -y install \ # then remove --enable-shared from the configure line below. # this will remove the ability to load python as a shared library (include python in other apps), but also avoides python # loading the wrong minor library version depending on your libary path (and avoids messing with the system python) # ./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-ipv6 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" ./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-ipv6 LDFLAGS="-Wl,-rpath /usr/local/lib" # build make -j2 -
cactus revised this gist
Oct 26, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ BUILD_VER=3.6.3 PY_BUILD_VER="${BUILD_VER%.*}" PY_SHORT="${PY_BUILD_VER//.}" STRIP="yes" -
cactus revised this gist
Oct 26, 2017 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -29,13 +29,15 @@ yum -y install \ # then remove --enable-shared from the configure line below. # this will remove the ability to load python as a shared library (include python in other apps), but also avoides python # loading the wrong minor library version depending on your libary path (and avoids messing with the system python) # ./configure --prefix=/usr/local --enable-optimizations --enable-ipv6 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" ./configure --prefix=/usr/local --enable-optimizations --enable-ipv6 LDFLAGS="-Wl,-rpath /usr/local/lib" # build make -j2 # change make install to make altinstall if you do not want to symlink python to the python3.x executable # make install DESTDIR=/tmp/installdir make altinstall DESTDIR=/tmp/installdir # optinally strip symbols to slightly reduce runtime memory footprint if [ "$STRIP" = "yes" ]; then -
cactus revised this gist
Jul 1, 2017 . 1 changed file with 11 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ BUILD_VER=3.6.1 PY_BUILD_VER="${BUILD_VER%.*}" PY_SHORT="${PY_BUILD_VER//.}" STRIP="yes" mkdir download /tmp/installdir; cd download; curl -LO http://python.org/ftp/python/${BUILD_VER}/Python-${BUILD_VER}.tgz @@ -36,6 +37,15 @@ make -j2 # change make install to make altinstall if you do not want to symlink python to the python3.x executable make install DESTDIR=/tmp/installdir # optinally strip symbols to slightly reduce runtime memory footprint if [ "$STRIP" = "yes" ]; then for f in /tmp/installdir/usr/local/lib/libpython*; do [ ! -L "$f" ] && strip "$f" done strip /tmp/installdir/usr/local/bin/python${PY_BUILD_VER} strip /tmp/installdir/usr/local/bin/python${PY_BUILD_VER}m fi echo '/sbin/ldconfig' > /tmp/installdir/run-ldconfig.sh fpm -s dir -t rpm -n python${PY_SHORT} -v ${BUILD_VER} -C /tmp/installdir \ --after-install /tmp/installdir/run-ldconfig.sh \ @@ -54,7 +64,7 @@ fpm -s dir -t rpm -n python${PY_SHORT} -v ${BUILD_VER} -C /tmp/installdir \ --directories=/usr/local/lib/python${PY_BUILD_VER}/ \ --directories=/usr/local/include/python${PY_BUILD_VER}m/ \ usr/local # note: after install, you may need to do the following, depending no use of --enable-shared in the configure step: # echo '/usr/local/lib' > /etc/ld.so.conf.d/usr-local.conf # ldconfig -v -
cactus revised this gist
Jul 1, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -52,7 +52,7 @@ fpm -s dir -t rpm -n python${PY_SHORT} -v ${BUILD_VER} -C /tmp/installdir \ -d 'xz' \ -d 'zlib' \ --directories=/usr/local/lib/python${PY_BUILD_VER}/ \ --directories=/usr/local/include/python${PY_BUILD_VER}m/ \ usr/local # note: after install, you may need to do the following, depending no use of --enable-shared in the configure step: -
cactus revised this gist
Jul 1, 2017 . No changes.There are no files selected for viewing
-
cactus revised this gist
Jul 1, 2017 . 2 changed files with 87 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,43 +1,58 @@ BUILD_VER=2.7.13 PY_BUILD_VER="${BUILD_VER%.*}" PY_SHORT="${PY_BUILD_VER//.}" mkdir download /tmp/installdir; cd download; curl -LO http://python.org/ftp/python/${BUILD_VER}/Python-${BUILD_VER}.tgz tar xf Python-${BUILD_VER}.tgz cd Python-${BUILD_VER} # install compilers, devtools yum groupinstall -y "development tools" # install build deps yum -y install \ bzip2-devel \ db4-devel \ expat-devel \ gdbm-devel \ ncurses-devel \ openssl-devel \ readline-devel \ sqlite-devel \ xz-devel \ zlib-devel # note: if you want multiple minor version of python on the system, eg system python is 2.7.5 and you want 2.7.13, # then remove --enable-shared from the configure line below. # this will remove the ability to load python as a shared library (include python in other apps), but also avoides python # loading the wrong minor library version depending on your libary path (and avoids messing with the system python) ./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-ipv6 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" # build make -j2 # change make install to make altinstall if you do not want to symlink python and python2 to the python2.7 executable make altinstall DESTDIR=/tmp/installdir echo '/sbin/ldconfig' > /tmp/installdir/run-ldconfig.sh fpm -s dir -t rpm -n python${PY_SHORT} -v ${BUILD_VER} -C /tmp/installdir \ --after-install /tmp/installdir/run-ldconfig.sh \ -d 'bzip2' \ -d 'db4' \ -d 'expat' \ -d 'gdbm' \ -d 'ncurses' \ -d 'openssl' \ -d 'readline' \ -d 'sqlite' \ -d 'xz' \ -d 'zlib' \ --directories=/usr/local/lib/python${PY_BUILD_VER}/ \ --directories=/usr/local/include/python${PY_BUILD_VER}/ \ usr/local # note: after install, you may need to do the following, depending no use of --enable-shared in the configure step: # echo '/usr/local/lib' > /etc/ld.so.conf.d/usr-local.conf # ldconfig -v This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,60 @@ BUILD_VER=3.6.1 PY_BUILD_VER="${BUILD_VER%.*}" PY_SHORT="${PY_BUILD_VER//.}" mkdir download /tmp/installdir; cd download; curl -LO http://python.org/ftp/python/${BUILD_VER}/Python-${BUILD_VER}.tgz tar xf Python-${BUILD_VER}.tgz cd Python-${BUILD_VER} # install compilers, devtools yum groupinstall -y "development tools" # install build deps yum -y install \ bzip2-devel \ db4-devel \ expat-devel \ gdbm-devel \ ncurses-devel \ openssl-devel \ readline-devel \ sqlite-devel \ xz-devel \ zlib-devel # note: if you want multiple minor version of python on the system, eg system python is 2.7.5 and you want 2.7.13, # then remove --enable-shared from the configure line below. # this will remove the ability to load python as a shared library (include python in other apps), but also avoides python # loading the wrong minor library version depending on your libary path (and avoids messing with the system python) ./configure --prefix=/usr/local --enable-optimizations --enable-ipv6 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" # build make -j2 # change make install to make altinstall if you do not want to symlink python to the python3.x executable make install DESTDIR=/tmp/installdir echo '/sbin/ldconfig' > /tmp/installdir/run-ldconfig.sh fpm -s dir -t rpm -n python${PY_SHORT} -v ${BUILD_VER} -C /tmp/installdir \ --after-install /tmp/installdir/run-ldconfig.sh \ --provides "python(abi) = ${PY_SHORT}" \ --provides "python${PY_SHORT} = ${BUILD_VER}" \ -d 'bzip2' \ -d 'db4' \ -d 'expat' \ -d 'gdbm' \ -d 'ncurses' \ -d 'openssl' \ -d 'readline' \ -d 'sqlite' \ -d 'xz' \ -d 'zlib' \ --directories=/usr/local/lib/python${PY_BUILD_VER}/ \ --directories=/usr/local/include/python${PY_BUILD_VER}/ \ usr/local # note: after install, you may need to do the following, depending no use of --enable-shared in the configure step: # echo '/usr/local/lib' > /etc/ld.so.conf.d/usr-local.conf # ldconfig -v -
cactus revised this gist
Dec 19, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ cd Python-${BUILD_VER} # install build deps yum -y install openssl-devel readline-devel bzip2-devel sqlite-devel zlib-devel ncurses-devel db4-devel expat-devel gdbm-devel # note: if you want multiple minor version of python on the system, eg system python is 2.7.5 and you want 2.7.13, # then remove --enable-shared from the configure line below. # this will remove the ability to load python as a shared library (include python in other apps), but also avoides python # loading the wrong minor library version depending on your libary path (and avoids messing with the system python) -
cactus revised this gist
Dec 19, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ BUILD_VER=2.7.13 mkdir download /tmp/installdir; cd download; curl -LO http://python.org/ftp/python/${BUILD_VER}/Python-${BUILD_VER}.tgz -
cactus revised this gist
Dec 8, 2016 . 1 changed file with 14 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,10 +5,22 @@ curl -LO http://python.org/ftp/python/${BUILD_VER}/Python-${BUILD_VER}.tgz tar xf Python-${BUILD_VER}.tgz cd Python-${BUILD_VER} # install build deps yum -y install openssl-devel readline-devel bzip2-devel sqlite-devel zlib-devel ncurses-devel db4-devel expat-devel gdbm-devel # note: if you want multiple minor version of python on the system, eg system python is 2.7.5 and you want 2.7.12, # then remove --enable-shared from the configure line below. # this will remove the ability to load python as a shared library (include python in other apps), but also avoides python # loading the wrong minor library version depending on your libary path (and avoids messing with the system python) ./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-ipv6 --enable-shared # build make -j2 # change make install to make altinstall if you do not want to symlink python and python2 to the python2.7 executable make install DESTDIR=/tmp/installdir echo '/sbin/ldconfig' > /tmp/installdir/run-ldconfig.sh fpm -s dir -t rpm -n python27 -v ${BUILD_VER} -C /tmp/installdir \ --after-install /tmp/installdir/run-ldconfig.sh \ @@ -26,6 +38,6 @@ fpm -s dir -t rpm -n python27 -v ${BUILD_VER} -C /tmp/installdir \ usr/local # note: after install, you may need to do the following, depending no use of --enable-shared in the configure step: # echo '/usr/local/lib' > /etc/ld.so.conf.d/usr-local.conf # ldconfig -v -
cactus revised this gist
Dec 8, 2016 . No changes.There are no files selected for viewing
-
cactus revised this gist
Dec 8, 2016 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,7 @@ BUILD_VER=2.7.12 mkdir download /tmp/installdir; cd download; curl -LO http://python.org/ftp/python/${BUILD_VER}/Python-${BUILD_VER}.tgz tar xf Python-${BUILD_VER}.tgz cd Python-${BUILD_VER} yum -y install openssl-devel readline-devel bzip2-devel sqlite-devel zlib-devel ncurses-devel db4-devel expat-devel gdbm-devel @@ -23,3 +24,8 @@ fpm -s dir -t rpm -n python27 -v ${BUILD_VER} -C /tmp/installdir \ --directories=/usr/local/lib/python2.7/ \ --directories=/usr/local/include/python2.7/ \ usr/local # note: after install, you may need to do the following: # echo '/usr/local/lib' > /etc/ld.so.conf.d/usr-local.conf # ldconfig -v -
cactus revised this gist
Dec 8, 2016 . No changes.There are no files selected for viewing
-
cactus revised this gist
Dec 8, 2016 . No changes.There are no files selected for viewing
-
cactus revised this gist
Dec 8, 2016 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ mkdir download /tmp/installdir; cd download; curl -LO http://python.org/ftp/python/${BUILD_VER}/Python-${BUILD_VER}.tgz tar xf Python-${BUILD_VER}.tgz cd Python-${BUILD_VER} yum -y install openssl-devel readline-devel bzip2-devel sqlite-devel zlib-devel ncurses-devel db4-devel expat-devel gdbm-devel ./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared --enable-ipv6 make -j2 make install DESTDIR=/tmp/installdir @@ -19,6 +19,7 @@ fpm -s dir -t rpm -n python27 -v ${BUILD_VER} -C /tmp/installdir \ -d 'sqlite' \ -d 'ncurses' \ -d 'readline' \ -d 'gdbm' \ --directories=/usr/local/lib/python2.7/ \ --directories=/usr/local/include/python2.7/ \ usr/local -
cactus revised this gist
Dec 8, 2016 . 1 changed file with 6 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,15 @@ BUILD_VER=2.7.12 mkdir download /tmp/installdir; cd download; curl -LO http://python.org/ftp/python/${BUILD_VER}/Python-${BUILD_VER}.tgz tar xf Python-${BUILD_VER}.tgz cd Python-${BUILD_VER} yum -y install openssl-devel readline-devel bzip2-devel sqlite-devel zlib-devel ncurses-devel db4-devel expat-devel ./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared --enable-ipv6 make -j2 make install DESTDIR=/tmp/installdir echo '/sbin/ldconfig' > /tmp/installdir/run-ldconfig.sh fpm -s dir -t rpm -n python27 -v ${BUILD_VER} -C /tmp/installdir \ --after-install /tmp/installdir/run-ldconfig.sh \ -d 'openssl' \ -d 'bzip2' \ -
cactus created this gist
Dec 2, 2013 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ mkdir download /tmp/installdir; cd download; curl -LO http://python.org/ftp/python/2.7.6/Python-2.7.6.tgz tar xf Python-2.7.6.tgz cd Python-2.7.6 yum -y install openssl-devel readline-devel bzip2-devel sqlite-devel zlib-devel ncurses-devel db4-devel expat-devel ./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared --enable-ipv6 make -j2 make install DESTDIR=/tmp/installdir echo '/sbin/ldconfig' > /tmp/installdir/run-ldconfig.sh fpm -s dir -t rpm -n python27 -v 2.7.6 -C /tmp/installdir \ --after-install /tmp/installdir/run-ldconfig.sh \ -d 'openssl' \ -d 'bzip2' \ -d 'zlib' \ -d 'expat' \ -d 'db4' \ -d 'sqlite' \ -d 'ncurses' \ -d 'readline' \ --directories=/usr/local/lib/python2.7/ \ --directories=/usr/local/include/python2.7/ \ usr/local