Skip to content

Commit 8ca63ac

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Fixed support python 2 on Fedora 27"
2 parents b359b96 + a30dd1c commit 8ca63ac

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

inc/python

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,9 @@ function get_python_exec_prefix {
4949
fi
5050
$xtrace
5151

52-
if python3_enabled && [[ "$os_VENDOR" == "CentOS" ]] || \
53-
[[ "$os_VENDOR" == "Fedora" && $os_RELEASE -gt 26 ]]; then
54-
# Default Python 3 install prefix changed to /usr/local in Fedora 27:
55-
# https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
56-
echo "/usr/local/bin"
57-
elif is_fedora || is_suse; then
58-
echo "/usr/bin"
59-
else
60-
echo "/usr/local/bin"
61-
fi
52+
local PYTHON_PATH=/usr/local/bin
53+
( is_fedora && ! python3_enabled ) || is_suse && PYTHON_PATH=/usr/bin
54+
echo $PYTHON_PATH
6255
}
6356

6457
# Wrapper for ``pip install`` that only installs versions of libraries

0 commit comments

Comments
 (0)