File tree 1 file changed +7
-4
lines changed 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -57,17 +57,20 @@ def load_pyproject_toml(
57
57
build_system = None
58
58
59
59
# The following cases must use PEP 517
60
- # We check for use_pep517 equalling False because that
61
- # means the user explicitly requested --no-use-pep517
60
+ # We check for use_pep517 being non-None and falsey because that means
61
+ # the user explicitly requested --no-use-pep517. The value 0 as
62
+ # opposed to False can occur when the value is provided via an
63
+ # environment variable or config file option (due to the quirk of
64
+ # strtobool() returning an integer in pip's configuration code).
62
65
if has_pyproject and not has_setup :
63
- if use_pep517 is False :
66
+ if use_pep517 is not None and not use_pep517 :
64
67
raise InstallationError (
65
68
"Disabling PEP 517 processing is invalid: "
66
69
"project does not have a setup.py"
67
70
)
68
71
use_pep517 = True
69
72
elif build_system and "build-backend" in build_system :
70
- if use_pep517 is False :
73
+ if use_pep517 is not None and not use_pep517 :
71
74
raise InstallationError (
72
75
"Disabling PEP 517 processing is invalid: "
73
76
"project specifies a build backend of {} "
You can’t perform that action at this time.
0 commit comments