Skip to content

[FR] Support os.PathLike objects #142

@taralx

Description

@taralx

I prefer to use pathlib.Path objects, but helpers like distutils.Command.make_file only accept strings:

distutils/distutils/cmd.py

Lines 387 to 391 in 27638e3

if isinstance(infiles, str):
infiles = (infiles,)
elif not isinstance(infiles, (list, tuple)):
raise TypeError(
"'infiles' must be a string, or a list or tuple of strings")

Filing this issue before I go in and make a PR to change these to os.PathLike checks. Any issues with that approach?

Directed here from setuptools: pypa/setuptools#3315

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions