From 854f6f3a46dd2406186816e53235bd7bdc378e62 Mon Sep 17 00:00:00 2001 From: Yamashita Yuu Date: Thu, 13 Feb 2014 21:06:13 +0900 Subject: [PATCH] Exits with error if there is `~/.pydistutils.cfg` (#35, #111) --- plugins/python-build/bin/python-build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 76e4622a..b88fe0bb 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -1404,6 +1404,12 @@ if ! command -v curl 1>/dev/null 2>&1 && [[ "$(wget --version 2>/dev/null || tru exit 1 fi +# pydistutils.cfg may corrupt install location of Python libraries (#35, #111) +if [ -e "$HOME/.pydistutils.cfg" ]; then + echo "python-build: Please make sure you remove any previous custom paths from your $HOME/.pydistutils.cfg file." >&2 + exit 1 +fi + SEED="$(date "+%Y%m%d%H%M%S").$$" LOG_PATH="${TMP}/python-build.${SEED}.log" PYTHON_BIN="${PREFIX_PATH}/bin/python"