-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Align license_files
globs with data_files
globs
#2720
Comments
Thank you for bringing it to my attention. I have to admit that I needed to think about it a bit before writing this. My goal for the original PR (#2620) was to make it easier to include license files by copying what It's true that adding the In the end it might be possible to do the deprecation, I'm just not sure if there is a true need for it. It should be fair to assume that most users either didn't add the -- |
What are your thoughts on this @jaraco? It sounds like it might be too disruptive to add the |
Sorry for not giving feedback sooner. I'm leaning that direction too. It definitely would be unfortunate to have different formats for the same concept in the same tool and preferable to converge across tools. @darkvertex Would you be willing to adapt the PR to implement implicit glob support? |
Sure, no problem. I'll get back to you. |
@jaraco Updated my PR: #2712 👍 Since we're going for "implicit" globbing, I made a choice to support globby-like filenames literally should they exist, so if someone made such a file and is expecting it to match the real file on disk instead of expanding the pattern, they will get the expected result (I think!) -- At the same time, it's a bit of an edge case, but.. 🤷♂️ If you disagree with this decision we can take it out but I think it's what a user would expect. You can see my updated unit test for an example using a file with a question mark and having it match the file correctly as a literal value. |
In #2712, Setuptools is considering adding glob support for declarative config for
data_files
. In that PR, I observed thatlicense_files
already has glob support, but handled in the dist and not the config. In this comment, option A proposes to align thelicense_files
directive with this design, requiring users to use aglob:
directive to indicate if a glob is present (and if wildcards are present, presume they're literals). To deal with the backward-incompatibility of this change, I propose the following transition forlicense_files
:glob:
directive, and if present, expand the values when loading the config (same asdata_files
).glob:
directive and warn if such a value expands due to globbing.If I recall, the
license_files
setting (and its default) is also entangled withlicense_file
. Perhaps as part of this change, support forlicense_file
could also be removed or at least decoupled from license_files, such that the default forlicense_files
would be simplyglob: LICEN[CS]E*, COPYING*, NOTICE*, AUTHORS*
.@cdce8p Since you contributed much (all?) of the
license_files
support, I'd like your opinion. Does this approach sound acceptable?The text was updated successfully, but these errors were encountered: