Last active
July 30, 2020 02:44
-
-
Save amane-katagiri/1df71cd8677864f260ea3ffa96854be5 to your computer and use it in GitHub Desktop.
パイソンのビルドは温かみのある手で
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
#!/bin/bash -ue | |
VERSION="$1" | |
sudo apt install build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \ | |
libjpeg-dev libncurses5-dev libncursesw5-dev liblzma-dev tk-dev xz-utils libffi-dev \ | |
libgdbm-dev libdb-dev libffi-dev uuid-dev wget | |
cd /tmp | |
wget -O - "https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tgz" | tar zxvf - | |
cd "Python-$VERSION" | |
./configure --prefix="$HOME/usr" --enable-optimizations | |
make 2>&1 | tee make.log | |
set +e | |
if grep -A 3 "The necessary bits to build these optional modules were not found:" make.log 1>&2; then | |
echo "Add required packages and re-run ./configure and make." 1>&2 | |
else | |
make install | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment