Check pycparser's availability when building PyPy from source

This commit is contained in:
Yamashita, Yuu 2017-08-09 22:23:31 +09:00
parent fc23323ed4
commit 0fe7d78503

View file

@ -213,10 +213,12 @@ if [ -z "${PYENV_BOOTSTRAP_VERSION}" ]; then
done done
fi fi
if [ -n "$PYENV_BOOTSTRAP_VERSION" ]; then if [ -n "$PYENV_BOOTSTRAP_VERSION" ]; then
if ! PYENV_VERSION="$PYENV_BOOTSTRAP_VERSION" pyenv-exec python -c 'import curses' 1>/dev/null 2>&1; then for dep in curses pycparser; do
echo "pyenv-install: $VERSION_NAME: PyPy requires \`curses' in $PYENV_BOOTSTRAP_VERSION to build from source." >&2 if ! PYENV_VERSION="$PYENV_BOOTSTRAP_VERSION" pyenv-exec python -c "import ${dep}" 1>/dev/null 2>&1; then
echo "pyenv-install: $VERSION_NAME: PyPy requires \`${dep}' in $PYENV_BOOTSTRAP_VERSION to build from source." >&2
exit 1 exit 1
fi fi
done
else else
echo "pyenv-install: $VERSION_NAME: PyPy requires Python 2.7 to build from source." >&2 echo "pyenv-install: $VERSION_NAME: PyPy requires Python 2.7 to build from source." >&2
exit 1 exit 1