Skip to content
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 #4495

Closed
wants to merge 2 commits into from

Conversation

InvincibleRMC
Copy link
Contributor

Summary of changes

Adds support for Path objects to generate data_files from setup().

Closes #4494

Pull Request Checklist

@jaraco
Copy link
Member

jaraco commented Jul 19, 2024

Thanks for the contrib. Unfortunately, _distutils is tracked in an upstream repo. There's already some work in progress. I'll take your proposal and apply it there and see if that doesn't get us closer to a solution.

@jaraco jaraco closed this Jul 19, 2024
Comment on lines +60 to +69
elif isinstance(f, Path):
# it's a simple file, so copy it
f = convert_path(str(f))
if self.warn_dir:
self.warn(
"setup script did not provide a directory for "
f"'{f}' -- installing right in '{self.install_dir}'"
)
(out, _) = self.copy_file(f, self.install_dir)
self.outfiles.append(out)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this approach, I think I'm going to decline. I want to avoid creating more branches and duplicating more code.

@InvincibleRMC
Copy link
Contributor Author

Ah my apologies let me know If I can be of any assistance.

@jaraco
Copy link
Member

jaraco commented Jul 19, 2024

Thanks for the contrib. Unfortunately, _distutils is tracked in an upstream repo. There's already some work in progress. I'll take your proposal and apply it there and see if that doesn't get us closer to a solution.

Oh, my mistake. I see now this change is different. The other issue is about Extensions, this is about data files. Still, I'll take the code here and see if I can apply it at distutils. I really appreciate the work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR] Add Path support to data-files
2 participants