Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,12 @@ pipenv
```

You can specify a non-default location of this file by setting a `ASDF_PYTHON_DEFAULT_PACKAGES_FILE` variable.

## Debugging

You can get more verbose information about a python installation by setting `PYENV_DEBUG`, for example:

```
PYENV_DEBUG=1 asdf install python latest
```

13 changes: 9 additions & 4 deletions bin/install
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
#!/usr/bin/env bash

set -e
[ -n "$PYENV_DEBUG" ] && set -x


source "$(dirname "$0")/utils.sh"

install_python() {
local install_type=$1
local version=$2
local install_path=$3
local VERBOSE

[ -n "$PYENV_DEBUG" ] && VERBOSE="-v"

if [ "$install_type" != "version" ]; then
echoerr "Cannot install specific ref from source, sorry."
Expand All @@ -16,17 +21,17 @@ install_python() {
fi
install_or_update_python_build

if [[ -n "${ASDF_PYTHON_PATCH_URL:-}" ]]; then
if [[ -n "${ASDF_PYTHON_PATCH_URL:-}" ]]; then
echo "python-build --patch $version $install_path"
echo "with patch file from: $ASDF_PYTHON_PATCH_URL"
$(python_build_path) --patch "$version" "$install_path" < <(curl -sSL "$ASDF_PYTHON_PATCH_URL")
$(python_build_path) $VERBOSE --patch "$version" "$install_path" < <(curl -sSL "$ASDF_PYTHON_PATCH_URL")
elif [[ -n "${ASDF_PYTHON_PATCHES_DIRECTORY:-}" ]] && [[ -f ${ASDF_PYTHON_PATCHES_DIRECTORY}/${version}.patch ]]; then
local patch_file=${ASDF_PYTHON_PATCHES_DIRECTORY}/${version}.patch
echo "python-build $version $install_path -p < $patch_file"
$(python_build_path) "$version" "$install_path" -p < $patch_file
$(python_build_path) $VERBOSE "$version" "$install_path" -p < $patch_file
else
echo "python-build $version $install_path"
$(python_build_path) "$version" "$install_path"
$(python_build_path) $VERBOSE "$version" "$install_path"
fi
}

Expand Down