Skip to content

Commit 28a2357

Browse files
committed
download most recent python
1 parent 2331b93 commit 28a2357

File tree

3 files changed

+24
-20
lines changed

3 files changed

+24
-20
lines changed

irods/test/harness/003_prc-with-py3_12_2.Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
from install-irods
1+
from ssl-and-pam
22
run apt update
33
run apt install -y wget build-essential libssl-dev zlib1g-dev
44
run apt install wget build-essential
5-
run wget https://www.python.org/ftp/python/3.12.2/Python-3.12.2.tar.xz
6-
run tar xf Python-3.12.2.tar.xz
7-
workdir /Python-3.12.2
5+
arg python_version
6+
run wget https://www.python.org/ftp/python/${python_version}/Python-${python_version}.tar.xz
7+
run tar xf Python-${python_version}.tar.xz
8+
workdir /Python-${python_version}
89
run ./configure --prefix /root/python --with-ensurepip=install
910
run make -j
1011
run mkdir /root/python

irods/test/harness/most_recent_python.py

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
usage() {
3+
echo >&2 "Usage:
4+
$0 major.minor"
5+
echo >&2 "Output:
6+
prints full latest python version inclusive of the patch level."
7+
exit 2
8+
}
9+
MAJOR_MINOR=$1
10+
if ! [[ $MAJOR_MINOR =~ [0-9]+\.[0-9]+ ]]; then
11+
usage
12+
fi
13+
14+
url='https://www.python.org/ftp/python/'
15+
16+
# Fetch the directory listing, extract version numbers, sort them to find the largest numerically.
17+
curl --silent "$url"|\
18+
sed -n 's!.*href="\('${MAJOR_MINOR}'\.[0-9]\+\)/".*!\1!p'|sort -rV|\
19+
head -n 1

0 commit comments

Comments
 (0)