-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow path objects for data-files #271
Conversation
distutils/command/install_data.py
Outdated
@@ -56,6 +57,16 @@ def run(self): | |||
) | |||
(out, _) = self.copy_file(f, self.install_dir) | |||
self.outfiles.append(out) | |||
elif isinstance(f, Path): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This covers the case that one of the data files is a simple pathlib.Path, but it doesn't cover the case if a pathlib.Path
is used in a tuple (in the else block below).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah you are right. Should I fix it or do you want to fix it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm on it. But thanks for offering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thinking is that convert_path
already wraps all the places where a Path might be encountered, so probably that should be expanded to account for pathlib.Path
.
Prior to 3.11, singledispatch[method] doesn't know about unions.
Looks like I jumped the gun on the merge. I've backed out the merge and going to re-submit (#272). |
Ported from pypa/setuptools#4495 by @InvincibleRMC.