mirror of
https://github.com/pyenv/pyenv-doctor.git
synced 2026-02-06 02:47:35 +09:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bad83e51e1 | ||
|
|
487af4f915 | ||
|
|
004fbacbaa | ||
|
|
467d6d4e24 | ||
|
|
21fb911d5c | ||
|
|
b612411ac7 | ||
|
|
56871eba3b | ||
|
|
3c6a422560 | ||
|
|
230dc7a904 | ||
|
|
e492fea410 | ||
|
|
38076e28e1 | ||
|
|
cde23c2f35 | ||
|
|
1342a4afeb | ||
|
|
beb447e6d7 | ||
|
|
5aba43708e | ||
|
|
fbe25a90d1 | ||
|
|
68fb05720e | ||
|
|
3d14995097 | ||
|
|
2e59c96af6 |
@ -8,3 +8,6 @@ python:
|
||||
install: python
|
||||
mkdir -p "$(PREFIX)/bin"
|
||||
install -m 755 $< "$(PREFIX)/bin/python"
|
||||
|
||||
clean:
|
||||
rm -f python
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# pyenv-doctor
|
||||
|
||||
pyenv-doctor is a [pyenv](https://github.com/yyuu/pyenv) plugin
|
||||
pyenv-doctor is a [pyenv](https://github.com/pyenv/pyenv) plugin
|
||||
that provides a `pyenv doctor` command to verify pyenv installation
|
||||
and development tools to build pythons.
|
||||
|
||||
@ -11,7 +11,7 @@ and development tools to build pythons.
|
||||
Installing pyenv-doctor as a pyenv plugin will give you access to the
|
||||
`pyenv doctor` command.
|
||||
|
||||
$ git clone git://github.com/yyuu/pyenv-doctor.git ~/.pyenv/plugins/pyenv-doctor
|
||||
$ git clone https://github.com/pyenv/pyenv-doctor.git $(pyenv root)/plugins/pyenv-doctor
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Summary: Verify pyenv installation and deevlopment tools to build pythons.
|
||||
# Summary: Verify pyenv installation and development tools to build pythons.
|
||||
#
|
||||
# Usage: pyenv doctor [OPTIONS]
|
||||
#
|
||||
@ -128,7 +128,7 @@ REPOSITORY="${PYENV_DOCTOR_ROOT}"
|
||||
BRANCH="$(cd "${PYENV_DOCTOR_ROOT}" && git name-rev --name-only HEAD)"
|
||||
mkdir -p "${BUILD_PATH}"
|
||||
cat <<EOF > "${DEFINITION}"
|
||||
install_git "pyenv-doctor" "${REPOSITORY}" "${BRANCH}" standard
|
||||
install_git "python-pyenv-doctor" "${REPOSITORY}" "${BRANCH}" standard
|
||||
EOF
|
||||
|
||||
# if none is selected, check as WITH_CPYTHON
|
||||
@ -137,26 +137,30 @@ if [ -z "${WITH_JYTHON}" ] && [ -z "${WITH_PYPY}" ] && [ -z "${WITH_STACKLESS}"
|
||||
fi
|
||||
|
||||
if [ -n "${WITH_ALL}" ] || [ -n "${WITH_CPYTHON}" ]; then
|
||||
export CONFIGURE_OPTS+="--with-cpython"
|
||||
export CONFIGURE_OPTS="--with-cpython $CONFIGURE_OPTS"
|
||||
fi
|
||||
if [ -n "${WITH_ALL}" ] || [ -n "${WITH_JYTHON}" ]; then
|
||||
export CONFIGURE_OPTS+="--with-jython"
|
||||
export CONFIGURE_OPTS="--with-jython $CONFIGURE_OPTS"
|
||||
fi
|
||||
if [ -n "${WITH_ALL}" ] || [ -n "${WITH_PYPY}" ]; then
|
||||
export CONFIGURE_OPTS+="--with-pypy"
|
||||
export CONFIGURE_OPTS="--with-pypy $CONFIGURE_OPTS"
|
||||
fi
|
||||
if [ -n "${WITH_ALL}" ] || [ -n "${WITH_STACKLESS}" ]; then
|
||||
export CONFIGURE_OPTS+="--with-stackless"
|
||||
export CONFIGURE_OPTS="--with-stackless $CONFIGURE_OPTS"
|
||||
fi
|
||||
|
||||
case "$(uname -s)" in
|
||||
"Darwin" )
|
||||
## ld(1) on Mac OS X searches /usr/lib first of /usr/local/lib.
|
||||
## to override system libraries installed in /usr/lib,
|
||||
## ld(1) on Mac OS X searches /usr/lib first of Homebrew's lib.
|
||||
## to override system libraries installed by Homebrew,
|
||||
## we must explicitly specify the library path in "-L".
|
||||
if command -v brew 1>/dev/null 2>&1; then # Homebrew
|
||||
[ -d "/usr/local/include" ] && export CFLAGS+="-I/usr/local/include"
|
||||
[ -d "/usr/local/lib" ] && export LDFLAGS+="-L/usr/local/lib"
|
||||
[ -d "$(brew --prefix)/include" ] && export CPPFLAGS="-I$(brew --prefix)/include $CPPFLAGS"
|
||||
[ -d "$(brew --prefix openssl)/include" ] && export CPPFLAGS="-I$(brew --prefix openssl)/include $CPPFLAGS"
|
||||
[ -d "$(brew --prefix openssl@1.1)/include" ] && export CPPFLAGS="-I$(brew --prefix openssl@1.1)/include $CPPFLAGS"
|
||||
[ -d "$(brew --prefix)/lib" ] && export LDFLAGS="-L$(brew --prefix)/lib $LDFLAGS"
|
||||
[ -d "$(brew --prefix openssl)/lib" ] && export LDFLAGS="-L$(brew --prefix openssl)/lib $LDFLAGS"
|
||||
[ -d "$(brew --prefix openssl@1.1)/lib" ] && export LDFLAGS="-L$(brew --prefix openssl@1.1)/lib $LDFLAGS"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@ -169,7 +173,7 @@ if [ "${STATUS}" == "0" ]; then
|
||||
else
|
||||
{ echo -e "\033[0;31mProblem(s) detected while checking system.\033[0m"
|
||||
echo -e "\033[0;31m\033[0m"
|
||||
echo -e "\033[0;31mSee https://github.com/yyuu/pyenv/wiki/Common-build-problems for known solutions.\033[0m"
|
||||
echo -e "\033[0;31mSee https://github.com/pyenv/pyenv/wiki/Common-build-problems for known solutions.\033[0m"
|
||||
} 1>&2
|
||||
fi
|
||||
|
||||
|
||||
57
configure
vendored
57
configure
vendored
@ -3378,12 +3378,13 @@ fi
|
||||
done
|
||||
|
||||
|
||||
for ac_header in readline/readline.h
|
||||
for ac_header in readline/readline.h, readline/rlconf.h
|
||||
do :
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_readline_readline_h" = xyes; then :
|
||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
||||
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_READLINE_READLINE_H 1
|
||||
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
|
||||
_ACEOF
|
||||
HAVE_READLINE_H=yes
|
||||
else
|
||||
@ -3440,7 +3441,53 @@ else
|
||||
fi
|
||||
|
||||
if test "$HAVE_LIBSSL" = "no"; then
|
||||
as_fn_error $? "OpenSSL is not installed." "$LINENO" 5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenSSL <1.1 not installed. Checking v1.1 or beyond..." >&5
|
||||
$as_echo "$as_me: WARNING: OpenSSL <1.1 not installed. Checking v1.1 or beyond..." >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL_init_ssl in -lssl" >&5
|
||||
$as_echo_n "checking for OPENSSL_init_ssl in -lssl... " >&6; }
|
||||
if ${ac_cv_lib_ssl_OPENSSL_init_ssl+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lssl $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char OPENSSL_init_ssl ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return OPENSSL_init_ssl ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_ssl_OPENSSL_init_ssl=yes
|
||||
else
|
||||
ac_cv_lib_ssl_OPENSSL_init_ssl=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_OPENSSL_init_ssl" >&5
|
||||
$as_echo "$ac_cv_lib_ssl_OPENSSL_init_ssl" >&6; }
|
||||
if test "x$ac_cv_lib_ssl_OPENSSL_init_ssl" = xyes; then :
|
||||
HAVE_LIBSSL=yes
|
||||
else
|
||||
HAVE_LIBSSL=no
|
||||
fi
|
||||
|
||||
if test "$HAVE_LIBSSL" = "no"; then
|
||||
as_fn_error $? "OpenSSL is not installed." "$LINENO" 5
|
||||
fi
|
||||
fi
|
||||
for ac_header in openssl/ssl.h
|
||||
do :
|
||||
|
||||
@ -28,7 +28,7 @@ if ( test -n "$WITH_CPYTHON" || test -n "$WITH_PYPY" || test -n "$WITH_STACKLESS
|
||||
if test "$HAVE_LIBREADLINE" = "no"; then
|
||||
AC_MSG_ERROR([GNU readline is not installed.])
|
||||
fi
|
||||
AC_CHECK_HEADERS(readline/readline.h, [HAVE_READLINE_H=yes], [HAVE_READLINE_H=no])
|
||||
AC_CHECK_HEADERS([readline/readline.h, readline/rlconf.h], [HAVE_READLINE_H=yes], [HAVE_READLINE_H=no], [])
|
||||
if test "$HAVE_READLINE_H" = "no"; then
|
||||
AC_MSG_ERROR([GNU readline development header is not installed.])
|
||||
fi
|
||||
@ -36,7 +36,11 @@ if ( test -n "$WITH_CPYTHON" || test -n "$WITH_PYPY" || test -n "$WITH_STACKLESS
|
||||
## OpenSSL
|
||||
AC_CHECK_LIB(ssl, SSL_library_init, [HAVE_LIBSSL=yes], [HAVE_LIBSSL=no])
|
||||
if test "$HAVE_LIBSSL" = "no"; then
|
||||
AC_MSG_ERROR([OpenSSL is not installed.])
|
||||
AC_MSG_WARN([OpenSSL <1.1 not installed. Checking v1.1 or beyond...])
|
||||
AC_CHECK_LIB(ssl, OPENSSL_init_ssl, [HAVE_LIBSSL=yes], [HAVE_LIBSSL=no])
|
||||
if test "$HAVE_LIBSSL" = "no"; then
|
||||
AC_MSG_ERROR([OpenSSL is not installed.])
|
||||
fi
|
||||
fi
|
||||
AC_CHECK_HEADERS(openssl/ssl.h, [HAVE_SSL_H=yes], [HAVE_SSL_H=no])
|
||||
if test "$HAVE_SSL_H" = "no"; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user