Skip to content

Commit

Permalink
patch 8.0.1692: Python may not work when using statically linked library
Browse files Browse the repository at this point in the history
Problem:    Python may not work when using statically linked library .
Solution:   Do not define PYTHON_HOME and PYTHON3_HOME in configure if the
            Python library is linked statically.
  • Loading branch information
brammool committed Apr 10, 2018
1 parent 164268d commit 3a21d9c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/auto/configure
Original file line number Diff line number Diff line change
Expand Up @@ -6062,7 +6062,7 @@ $as_echo "$vi_cv_dll_name_python" >&6; }
else
PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version}"
fi
if test "X$have_python_config_dir" = "X1"; then
if test "X$have_python_config_dir" = "X1" -a "$enable_pythoninterp" = "dynamic"; then
PYTHON_CFLAGS="${PYTHON_CFLAGS} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"

fi
Expand Down Expand Up @@ -6398,7 +6398,7 @@ $as_echo "$vi_cv_dll_name_python3" >&6; }
else
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
fi
if test "X$have_python3_config_dir" = "X1"; then
if test "X$have_python3_config_dir" = "X1" -a "$enable_python3interp" = "dynamic"; then
PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
fi
PYTHON3_SRC="if_python3.c"
Expand Down
4 changes: 2 additions & 2 deletions src/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,7 @@ eof
else
PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version}"
fi
if test "X$have_python_config_dir" = "X1"; then
if test "X$have_python_config_dir" = "X1" -a "$enable_pythoninterp" = "dynamic"; then
dnl Define PYTHON_HOME if --with-python-config-dir was used
PYTHON_CFLAGS="${PYTHON_CFLAGS} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"

Expand Down Expand Up @@ -1469,7 +1469,7 @@ eof
else
PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
fi
if test "X$have_python3_config_dir" = "X1"; then
if test "X$have_python3_config_dir" = "X1" -a "$enable_python3interp" = "dynamic"; then
dnl Define PYTHON3_HOME if --with-python-config-dir was used
PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
fi
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1692,
/**/
1691,
/**/
Expand Down

0 comments on commit 3a21d9c

Please sign in to comment.