Don't complain if a patch file doesn't exist for a particular version of python
I hope this isn't too controversial: I personally have this `ASDF_PYTHON_PATCHES_DIRECTORY` globally set up on my machine, which is super useful when I install/reinstall random versions of Python, but is kind of annoying when I try to install versions of python that don't actually need a patch: I have to create an empty file just to get it to install. With this change, I don't have to do that: instead I only have to create `.patch` files for the versions of Python that need it.
This commit is contained in:
parent
57a4d725e4
commit
e3ada52ca4
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ install_python() {
|
|||
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")
|
||||
elif [[ -n "${ASDF_PYTHON_PATCHES_DIRECTORY:-}" ]]; then
|
||||
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
|
||||
|
|
Reference in a new issue