diff --git a/src/python/devcontainer-feature.json b/src/python/devcontainer-feature.json index 9f211244f..284f4a4a7 100644 --- a/src/python/devcontainer-feature.json +++ b/src/python/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "python", - "version": "1.4.2", + "version": "1.4.3", "name": "Python", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/python", "description": "Installs the provided version of Python, as well as PIPX, and other common Python utilities. JupyterLab is conditionally installed with the python feature. Note: May require source code compilation.", diff --git a/src/python/install.sh b/src/python/install.sh index e8a9d24e1..0f332021c 100755 --- a/src/python/install.sh +++ b/src/python/install.sh @@ -15,6 +15,7 @@ ENABLE_SHARED_FROM_SOURCE="${ENABLESHARED:-"false"}" PYTHON_INSTALL_PATH="${INSTALLPATH:-"/usr/local/python"}" OVERRIDE_DEFAULT_VERSION="${OVERRIDEDEFAULTVERSION:-"true"}" +export PIP_INDEX_URL=${PYPIINDEX:-"https://mirrors.aliyun.com/pypi/simple"} export PIPX_HOME=${PIPX_HOME:-"/usr/local/py-utils"} USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}" @@ -428,7 +429,7 @@ install_cpython() { mkdir -p /tmp/python-src ${INSTALL_PATH} cd /tmp/python-src cpython_tgz_filename="Python-${VERSION}.tgz" - cpython_tgz_url="https://www.python.org/ftp/python/${VERSION}/${cpython_tgz_filename}" + cpython_tgz_url="https://mirror.pixelreel.net/proxy/www.python.org/ftp/python/${VERSION}/${cpython_tgz_filename}" echo "Downloading ${cpython_tgz_filename}..." curl -sSL -o "/tmp/python-src/${cpython_tgz_filename}" "${cpython_tgz_url}" }