mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-14 20:39:55 -05:00
fix broken installation scripts for Jython and some of CPython.
replaced deprecated method calls of `fetch_url` by `http get`.
This commit is contained in:
parent
ad900ba436
commit
755c00e67c
9 changed files with 37 additions and 11 deletions
|
@ -299,13 +299,39 @@ fetch_svn() {
|
||||||
fetch_jar() {
|
fetch_jar() {
|
||||||
local package_name="$1"
|
local package_name="$1"
|
||||||
local package_url="$2"
|
local package_url="$2"
|
||||||
|
local mirror_url
|
||||||
|
local checksum
|
||||||
|
|
||||||
echo "Downloading ${package_url}..." >&2
|
if [ "$package_url" != "${package_url/\#}" ]; then
|
||||||
{ fetch_url "$package_url" > "${package_name}.jar"
|
checksum="${package_url#*#}"
|
||||||
$JAVA -jar ${package_name}.jar -s -d ${package_name}
|
package_url="${package_url%%#*}"
|
||||||
|
|
||||||
|
if [ -n "$PYTHON_BUILD_MIRROR_URL" ]; then
|
||||||
|
mirror_url="${PYTHON_BUILD_MIRROR_URL}/$checksum"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
local package_filename="${package_name}.jar"
|
||||||
|
symlink_jar_from_cache "$package_filename" "checksum" || {
|
||||||
|
echo "Downloading ${package_filename}..." >&2
|
||||||
|
{ http head "$mirror_url" &&
|
||||||
|
download_jar "$mirror_url" "$package_filename" "$checksum"
|
||||||
|
} ||
|
||||||
|
download_jar "$package_url" "$package_filename" "$checksum"
|
||||||
|
}
|
||||||
|
{ $JAVA -jar ${package_name}.jar -s -d ${package_name}
|
||||||
|
rm -f "$package_filename"
|
||||||
} >&4 2>&1
|
} >&4 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
symlink_jar_from_cache() {
|
||||||
|
symlink_tarball_from_cache "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
download_jar() {
|
||||||
|
download_tarball "$@"
|
||||||
|
}
|
||||||
|
|
||||||
build_package() {
|
build_package() {
|
||||||
local package_name="$1"
|
local package_name="$1"
|
||||||
shift
|
shift
|
||||||
|
|
|
@ -2,7 +2,7 @@ before_install_package() {
|
||||||
local package_name="$1"
|
local package_name="$1"
|
||||||
case "$package_name" in
|
case "$package_name" in
|
||||||
Python*)
|
Python*)
|
||||||
fetch_url "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
|
http get "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
|
||||||
patch -p0 < setup.patch
|
patch -p0 < setup.patch
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -2,7 +2,7 @@ before_install_package() {
|
||||||
local package_name="$1"
|
local package_name="$1"
|
||||||
case "$package_name" in
|
case "$package_name" in
|
||||||
Python*)
|
Python*)
|
||||||
fetch_url "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
|
http get "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
|
||||||
patch -p0 < setup.patch
|
patch -p0 < setup.patch
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -2,7 +2,7 @@ before_install_package() {
|
||||||
local package_name="$1"
|
local package_name="$1"
|
||||||
case "$package_name" in
|
case "$package_name" in
|
||||||
Python*)
|
Python*)
|
||||||
fetch_url "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
|
http get "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
|
||||||
patch -p0 < setup.patch
|
patch -p0 < setup.patch
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -2,7 +2,7 @@ before_install_package() {
|
||||||
local package_name="$1"
|
local package_name="$1"
|
||||||
case "$package_name" in
|
case "$package_name" in
|
||||||
Python*)
|
Python*)
|
||||||
fetch_url "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
|
http get "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
|
||||||
patch -p0 < setup.patch
|
patch -p0 < setup.patch
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -2,7 +2,7 @@ before_install_package() {
|
||||||
local package_name="$1"
|
local package_name="$1"
|
||||||
case "$package_name" in
|
case "$package_name" in
|
||||||
Python*)
|
Python*)
|
||||||
fetch_url "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
|
http get "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
|
||||||
patch -p0 < setup.patch
|
patch -p0 < setup.patch
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -2,7 +2,7 @@ before_install_package() {
|
||||||
local package_name="$1"
|
local package_name="$1"
|
||||||
case "$package_name" in
|
case "$package_name" in
|
||||||
Python*)
|
Python*)
|
||||||
fetch_url "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/python30/patch-setup.py.diff" > setup.patch
|
http get "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/python30/patch-setup.py.diff" > setup.patch
|
||||||
patch -p0 < setup.patch
|
patch -p0 < setup.patch
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -2,7 +2,7 @@ before_install_package() {
|
||||||
local package_name="$1"
|
local package_name="$1"
|
||||||
case "$package_name" in
|
case "$package_name" in
|
||||||
Python*)
|
Python*)
|
||||||
fetch_url "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
|
http get "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/common/patch-setup.py.diff" > setup.patch
|
||||||
patch -p0 < setup.patch
|
patch -p0 < setup.patch
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -2,7 +2,7 @@ before_install_package() {
|
||||||
local package_name="$1"
|
local package_name="$1"
|
||||||
case "$package_name" in
|
case "$package_name" in
|
||||||
Python*)
|
Python*)
|
||||||
fetch_url "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/python32/patch-setup.py.diff" > setup.patch
|
http get "https://raw.github.com/saghul/pythonz/346450868902fed0fe654c472b7b58e2e31fde70/pythonz/patches/all/python32/patch-setup.py.diff" > setup.patch
|
||||||
patch -p0 < setup.patch
|
patch -p0 < setup.patch
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue