Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Allow --with-build-python for all builds again
  • Loading branch information
tiran committed Dec 6, 2021
commit 0a3a53ca1fe965379c94e0e0e479b2f68ede8b6e
7 changes: 2 additions & 5 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1736,7 +1736,7 @@ Optional Packages:
path to _freeze_module binary for cross compiling
--with-build-python=python3.11
path to build python binary for cross compiling
(default: python3.11)
(default: _bootstrap_python or python3.11)
--with-pkg-config=[yes|no|check]
use pkg-config to detect build options (default is
check)
Expand Down Expand Up @@ -3243,14 +3243,11 @@ if test "${with_build_python+set}" = set; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-build-python" >&5
$as_echo_n "checking for --with-build-python... " >&6; }

if test "x$cross_compiling" = xno; then :
as_fn_error $? "--with-build-python only applies to cross compiling" "$LINENO" 5
fi
if test "x$with_build_python" = xyes; then :
with_build_python=python$PACKAGE_VERSION
fi
if test "x$with_build_python" = xno; then :
as_fn_error $? "invalid --with-build-python option: expected path, not \"no\"" "$LINENO" 5
as_fn_error $? "invalid --with-build-python option: expected path or \"yes\", not \"no\"" "$LINENO" 5
fi

if ! $(command -v "$with_build_python" >/dev/null 2>&1); then
Expand Down
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,16 @@ AC_ARG_WITH(
)
AC_SUBST([FREEZE_MODULE])

dnl build-python is used for cross compiling and macOS framework builds.
AC_ARG_WITH(
[build-python],
[AS_HELP_STRING([--with-build-python=python]PYTHON_VERSION,
[path to build python binary for cross compiling (default: python]PYTHON_VERSION[)])],
[path to build python binary for cross compiling (default: _bootstrap_python or python]PYTHON_VERSION[)])],
[
AC_MSG_CHECKING([for --with-build-python])

AS_VAR_IF([cross_compiling], [no], AC_MSG_ERROR([--with-build-python only applies to cross compiling]))
AS_VAR_IF([with_build_python], [yes], [with_build_python=python$PACKAGE_VERSION])
AS_VAR_IF([with_build_python], [no], [AC_MSG_ERROR([invalid --with-build-python option: expected path, not "no"])])
AS_VAR_IF([with_build_python], [no], [AC_MSG_ERROR([invalid --with-build-python option: expected path or "yes", not "no"])])

if ! $(command -v "$with_build_python" >/dev/null 2>&1); then
AC_MSG_ERROR([invalid or missing build python binary "$with_build_python"])
Expand Down