mirror of
https://github.com/bensuperpc/dockcross.git
synced 2025-06-10 21:19:26 +02:00
Update to python 3.9.5, fix build fail with manylinuximage
Update to python 3.9.5, fix build fail with manylinuximage Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
40
imagefiles/build-and-install-python.sh
Executable file
40
imagefiles/build-and-install-python.sh
Executable file
@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# Configure, build and install python
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# build-and-install-python.sh [-version 3.9.5]
|
||||
|
||||
PYTHON_VERSION=3.9.5
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-version|-v)
|
||||
PYTHON_VERSION=$2
|
||||
shift
|
||||
;;&
|
||||
*)
|
||||
echo "Usage: Usage: ${0##*/} [-version 3.9.5]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# Download
|
||||
wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz
|
||||
tar xvf Python-${PYTHON_VERSION}.tgz
|
||||
# Configure, build and install
|
||||
cd Python-${PYTHON_VERSION}
|
||||
# Disable --enable-shared --enable-optimizations --prefix=/usr/local/python-${PYTHON_VERSION}
|
||||
./configure --with-ensurepip=install
|
||||
make -j$(nproc)
|
||||
make install #altinstall
|
||||
|
||||
ln -s /usr/local/bin/python3 /usr/local/bin/python
|
||||
ln -s /usr/local/bin/pip3 /usr/local/bin/pip
|
||||
|
||||
# Clean
|
||||
cd ..
|
||||
rm -rf Python-${PYTHON_VERSION}
|
@ -22,8 +22,8 @@ cd /tmp
|
||||
|
||||
# Todo: Need to update base image from Debian Stretch for the required Python
|
||||
# 3.6 or later
|
||||
# curl -# -LO https://bootstrap.pypa.io/pip/get-pip.py
|
||||
curl -# -LO https://bootstrap.pypa.io/pip/2.7/get-pip.py
|
||||
curl -# -LO https://bootstrap.pypa.io/pip/get-pip.py
|
||||
#curl -# -LO https://bootstrap.pypa.io/pip/2.7/get-pip.py
|
||||
${PYTHON} get-pip.py --ignore-installed
|
||||
rm get-pip.py
|
||||
|
||||
|
Reference in New Issue
Block a user