8000 easy_install doesn't handle sysconfig vars being integers. · Issue #3063 · pypa/setuptools · GitHub
[go: up one dir, main page]

Skip to content
easy_install doesn't handle sysconfig vars being integers. #3063
@domdfcoding

Description

@domdfcoding

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.

self.config_vars = dict(sysconfig.get_config_vars())

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0