Skip to content

Commit 4c9b3ce

Browse files
committed
Fix some int-vs-str confusion with vars.
1 parent 8257d61 commit 4c9b3ce

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

Tools/configure/conf_extlibs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ def check_readline(v):
546546
v.LIBS = f"{v.LIBS} {v.READLINE_LIBS}".strip()
547547

548548
# Decide which header set to use based on WITH_EDITLINE
549-
use_editline = v.WITH_EDITLINE == "1"
549+
use_editline = with_readline == "edit"
550550
if use_editline:
551551
rl_includes = ["stdio.h", "editline/readline.h"]
552552
else:

Tools/configure/conf_modules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def setup_module_deps(v):
2323
v.LIBPYTHON = ""
2424

2525
android_api_level = v.ANDROID_API_LEVEL
26-
if v.PY_ENABLE_SHARED == "1" and (
26+
if v.PY_ENABLE_SHARED == 1 and (
2727
android_api_level or v.MACHDEP == "cygwin"
2828
):
2929
v.MODULE_DEPS_SHARED = f"{v.MODULE_DEPS_SHARED} $(LDLIBRARY)"

Tools/configure/conf_output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def generate_output(v):
7575
please run ./configure --enable-optimizations
7676
""")
7777

78-
if (v.PY_SUPPORT_TIER or "1") == "0":
78+
if v.PY_SUPPORT_TIER == 0:
7979
cc = v.ac_cv_cc_name
8080
host = v.host
8181
warnings.warn(

configure-new

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3513,7 +3513,7 @@ function u_check_readline( _i_h, _n_h, ac_cv_rl_append_history, ac_cv_rl_comp
35133513
pyconf_save_env()
35143514
V["CPPFLAGS"] = _str_strip(V["CPPFLAGS"] " " V["READLINE_CFLAGS"])
35153515
V["LIBS"] = _str_strip(V["LIBS"] " " V["READLINE_LIBS"])
3516-
use_editline = ((V["WITH_EDITLINE"] == "1") ? "yes" : "no")
3516+
use_editline = ((with_readline == "edit") ? "yes" : "no")
35173517
if (((use_editline != "") && (use_editline != "no"))) {
35183518
rl_includes = "stdio.h" " " "editline/readline.h"
35193519
} else {
@@ -4944,7 +4944,7 @@ function u_setup_module_deps( android_api_level) {
49444944
V["MODULE_DEPS_SHARED"] = "$(MODULE_DEPS_STATIC) $(EXPORTSYMS)"
49454945
V["LIBPYTHON"] = ""
49464946
android_api_level = V["ANDROID_API_LEVEL"]
4947-
if (((V["PY_ENABLE_SHARED"] == "1") && (((android_api_level != "") && (android_api_level != "no")) || (V["MACHDEP"] == "cygwin")))) {
4947+
if (((V["PY_ENABLE_SHARED"] == 1) && (((android_api_level != "") && (android_api_level != "no")) || (V["MACHDEP"] == "cygwin")))) {
49484948
V["MODULE_DEPS_SHARED"] = V["MODULE_DEPS_SHARED"] " $(LDLIBRARY)"
49494949
V["LIBPYTHON"] = "$(BLDLIBRARY)"
49504950
}
@@ -5781,7 +5781,7 @@ function u_generate_output( cc, host, srcdir_rel) {
57815781
if (((V["Py_OPT"] != "yes") && (V["Py_DEBUG"] != "yes"))) {
57825782
pyconf_notice("\nIf you want a release build with all stable optimizations active (PGO, etc),\nplease run ./configure --enable-optimizations\n")
57835783
}
5784-
if ((((V["PY_SUPPORT_TIER"] != "") ? V["PY_SUPPORT_TIER"] : "1") == "0")) {
5784+
if ((V["PY_SUPPORT_TIER"] == 0)) {
57855785
cc = V["ac_cv_cc_name"]
57865786
host = V["host"]
57875787
print "Platform \"" host "\" with compiler \"" cc "\" is not supported by the CPython core team, see https://peps.python.org/pep-0011/ for more information." > "/dev/stderr"

0 commit comments

Comments
 (0)