Allow for use_user_site being set to an integer
This can come from tox config, see:
@@ -616,11 +616,13 @@ def decide_user_install(
If use_user_site is None, the default behaviour depends on the environment,
which is provided by the other arguments.
"""
- if use_user_site is False:
+ # In some cases (config from tox), use_user_site can be set to an integer
+ # rather than a bool. Comparing == True/False instead of 'is' allows this.
+ if use_user_site == False: # noqa: E712
logger.debug("Non-user install by explicit request")
return False
- if use_user_site is True:
+ if use_user_site == True: # noqa: E712
if prefix_path:
raise CommandError(
"Can not combine '--user' and '--prefix' as they imply "
