@@ -29,6 +29,7 @@ ADDITIONAL_VERSIONS="${ADDITIONALVERSIONS:-""}"
2929DEFAULT_UTILS=(" pylint" " flake8" " autopep8" " black" " yapf" " mypy" " pydocstyle" " pycodestyle" " bandit" " pipenv" " virtualenv" " pytest" )
3030PYTHON_SOURCE_GPG_KEYS=" 64E628F8D684696D B26995E310250568 2D347EA6AA65421D FB9921286F5E1540 3A5CA953F73C700D 04C367C218ADD4FF 0EDDC5F26A45C816 6AF053F07D9DC8D2 C9BE28DEE6DF025C 126EB563A74B06BF D9866941EA5BBD71 ED9D77D5"
3131GPG_KEY_SERVERS=" keyserver hkp://keyserver.ubuntu.com
32+ keyserver hkp://keyserver.ubuntu.com:80
3233keyserver hkps://keys.openpgp.org
3334keyserver hkp://keyserver.pgp.com"
3435
@@ -78,7 +79,7 @@ updaterc() {
7879 fi
7980}
8081
81- # Import the specified key in a variable name passed in as
82+ # Import the specified key in a variable name passed in as
8283receive_gpg_keys () {
8384 local keys=${! 1}
8485 local keyring_args=" "
@@ -99,7 +100,7 @@ receive_gpg_keys() {
99100 local retry_count=0
100101 local gpg_ok=" false"
101102 set +e
102- until [ " ${gpg_ok} " = " true" ] || [ " ${retry_count} " -eq " 5" ];
103+ until [ " ${gpg_ok} " = " true" ] || [ " ${retry_count} " -eq " 5" ];
103104 do
104105 echo " (*) Downloading GPG key..."
105106 ( echo " ${keys} " | xargs -n 1 gpg -q ${keyring_args} --recv-keys) 2>&1 && gpg_ok=" true"
@@ -124,7 +125,7 @@ find_version_from_git_tags() {
124125 local repository=$2
125126 local prefix=${3:- " tags/v" }
126127 local separator=${4:- " ." }
127- local last_part_optional=${5:- " false" }
128+ local last_part_optional=${5:- " false" }
128129 if [ " $( echo " ${requested_version} " | grep -o " ." | wc -l) " != " 2" ]; then
129130 local escaped_separator=${separator// ./ \\ .}
130131 local last_part
@@ -206,24 +207,24 @@ check_packages() {
206207
207208add_symlink () {
208209 if [[ ! -d " ${CURRENT_PATH} " ]]; then
209- ln -s -r " ${INSTALL_PATH} " " ${CURRENT_PATH} "
210+ ln -s -r " ${INSTALL_PATH} " " ${CURRENT_PATH} "
210211 fi
211212
212213 if [ " ${OVERRIDE_DEFAULT_VERSION} " = " true" ]; then
213214 if [[ $( ls -l ${CURRENT_PATH} ) != * " -> ${INSTALL_PATH} " * ]] ; then
214215 rm " ${CURRENT_PATH} "
215- ln -s -r " ${INSTALL_PATH} " " ${CURRENT_PATH} "
216+ ln -s -r " ${INSTALL_PATH} " " ${CURRENT_PATH} "
216217 fi
217218 fi
218219}
219220
220221install_from_source () {
221- VERSION=$1
222+ VERSION=$1
222223 echo " (*) Building Python ${VERSION} from source..."
223224 # Install prereqs if missing
224225 check_packages curl ca-certificates gnupg2 tar make gcc libssl-dev zlib1g-dev libncurses5-dev \
225226 libbz2-dev libreadline-dev libxml2-dev xz-utils libgdbm-dev tk-dev dirmngr \
226- libxmlsec1-dev libsqlite3-dev libffi-dev liblzma-dev uuid-dev
227+ libxmlsec1-dev libsqlite3-dev libffi-dev liblzma-dev uuid-dev
227228 if ! type git > /dev/null 2>&1 ; then
228229 check_packages git
229230 fi
@@ -232,7 +233,7 @@ install_from_source() {
232233 find_version_from_git_tags VERSION " https://github.com/python/cpython"
233234
234235 INSTALL_PATH=" ${PYTHON_INSTALL_PATH} /${VERSION} "
235-
236+
236237 if [ -d " ${INSTALL_PATH} " ]; then
237238 echo " (!) Python version ${VERSION} already exists."
238239 exit 1
@@ -280,9 +281,9 @@ install_from_source() {
280281}
281282
282283install_using_oryx () {
283- VERSION=$1
284+ VERSION=$1
284285 INSTALL_PATH=" ${PYTHON_INSTALL_PATH} /${VERSION} "
285-
286+
286287 if [ -d " ${INSTALL_PATH} " ]; then
287288 echo " (!) Python version ${VERSION} already exists."
288289 exit 1
@@ -370,7 +371,7 @@ export DEBIAN_FRONTEND=noninteractive
370371# General requirements
371372check_packages curl ca-certificates gnupg2 tar make gcc libssl-dev zlib1g-dev libncurses5-dev \
372373 libbz2-dev libreadline-dev libxml2-dev xz-utils libgdbm-dev tk-dev dirmngr \
373- libxmlsec1-dev libsqlite3-dev libffi-dev liblzma-dev uuid-dev
374+ libxmlsec1-dev libsqlite3-dev libffi-dev liblzma-dev uuid-dev
374375
375376
376377# Install Python from source if needed
@@ -381,7 +382,7 @@ if [ "${PYTHON_VERSION}" != "none" ]; then
381382 usermod -a -G python " ${USERNAME} "
382383
383384 CURRENT_PATH=" ${PYTHON_INSTALL_PATH} /current"
384-
385+
385386 install_python ${PYTHON_VERSION}
386387
387388 # Additional python versions to be installed but not be set as default.
@@ -402,7 +403,7 @@ if [ "${PYTHON_VERSION}" != "none" ]; then
402403 updaterc " if [[ \"\$ {PATH}\" != *\" ${CURRENT_PATH} /bin\" * ]]; then export PATH=${CURRENT_PATH} /bin:\$ {PATH}; fi"
403404 PATH=" ${INSTALL_PATH} /bin:${PATH} "
404405 fi
405-
406+
406407 # Updates the symlinks for os-provided, or the installed python version in other cases
407408 chown -R " ${USERNAME} :python" " ${PYTHON_INSTALL_PATH} "
408409 chmod -R g+r+w " ${PYTHON_INSTALL_PATH} "
@@ -427,7 +428,7 @@ if [[ "${INSTALL_PYTHON_TOOLS}" = "true" ]] && [[ $(python --version) != "" ]];
427428 umask 0002
428429 mkdir -p ${PIPX_BIN_DIR}
429430 chown -R " ${USERNAME} :pipx" ${PIPX_HOME}
430- chmod -R g+r+w " ${PIPX_HOME} "
431+ chmod -R g+r+w " ${PIPX_HOME} "
431432 find " ${PIPX_HOME} " -type d -print0 | xargs -0 -n 1 chmod g+s
432433
433434 # Update pip if not using os provided python
0 commit comments