2016-04-24 10:28:48 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2017-01-22 09:31:29 +00:00
|
|
|
source $(dirname $0)/utils.sh
|
|
|
|
|
2016-04-24 10:28:48 +01:00
|
|
|
install_python() {
|
2016-08-30 07:25:56 +01:00
|
|
|
local version="$1"
|
|
|
|
local install_path="$2"
|
2016-04-24 10:28:48 +01:00
|
|
|
|
2017-01-22 09:31:29 +00:00
|
|
|
local tmp_dir="$(mktemp -d -t asdf-python.XXX)"
|
2016-04-24 10:28:48 +01:00
|
|
|
|
2017-01-22 09:31:29 +00:00
|
|
|
ensure_python_build_installed
|
2016-04-24 10:28:48 +01:00
|
|
|
|
2016-08-30 07:25:56 +01:00
|
|
|
ASDF_CONCURRENCY="${ASDF_CONCURRENCY:-1}"
|
|
|
|
echo "python-build $version $install_path"
|
2017-01-22 09:31:29 +00:00
|
|
|
MAKE_OPTS="$MAKE_OPTS -j$ASDF_CONCURRENCY" TMP_DIR="$tmp_dir" $(python_build_path) $version $install_path
|
2016-08-30 07:25:56 +01:00
|
|
|
echo "Cleaning up"
|
2017-01-22 09:31:29 +00:00
|
|
|
rm -rf "$tmp_dir"
|
2016-04-24 10:28:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
install_python $ASDF_INSTALL_VERSION $ASDF_INSTALL_PATH
|