From 6fef5f073591d11f66cab009eb8af27640990873 Mon Sep 17 00:00:00 2001 From: jacexh Date: Thu, 11 Apr 2024 11:53:22 +0800 Subject: [PATCH 1/2] add PIP_INDEX_URL var --- src/python/install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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}" } From f83b5f9cd27c1651b849bb7654704688ddc92e79 Mon Sep 17 00:00:00 2001 From: jacexh Date: Thu, 11 Apr 2024 13:50:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9python=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7=E6=9D=A5=E8=A7=A6=E5=8F=91=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/python/devcontainer-feature.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.",