[FR] Support os.PathLike objects
I prefer to use pathlib.Path objects, but helpers like distutils.Command.make_file only accept strings: https://github.com/pypa/distutils/blob/27638e388d8ae92368e5459254b59a026e73b1cd/distutils/cmd.py#L387-L391
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: https://github.com/pypa/setuptools/issues/3315
Yes, I agree it would be preferable to support Pathlike objects natively. Where possible, I'd like for distutils to simply pass these values along rather than handle them explicitly. Feel free to prepare a PR.
Do you mean that I should just remove the string checks?
Yes, I think so. See https://github.com/pypa/distutils/tree/refactor/142-allow-pathlike for how I might handle the situation.
Seems like your change is better than what I would have done. I'll take it and see where else the pattern should apply.