-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
In the create_home_path
function of setuptools/command/easy_install.py
the code fails with an AttributeError if path
is not a string. Since #3027 self.config_vars
has been created from sysconfig.get_config_vars()
, where the values can be strings or integers, such as 'WITH_PYMALLOC': 1
.
setuptools/setuptools/command/easy_install.py
Line 241 in b2ba0e3
self.config_vars = dict(sysconfig.get_config_vars()) |
setuptools/setuptools/command/easy_install.py
Lines 1337 to 1338 in b2ba0e3
for name, path in self.config_vars.items(): | |
if path.startswith(home) and not os.path.isdir(path): |
Because integers do not have a startswith
method an AttributeError is raised. Checking whether path
is a string should fix this.
I tried to reproduce this locally with easy_install
, but couldn't. However, it can be observed in pip's testsuite: https://github.com/pypa/pip/runs/5002678226