Conversation
d8c1930 to
c8372fc
Compare
| f.write(tomli_w.dumps({'readme': readme})) | ||
| if license != 'skip': | ||
| f.write(tomli_w.dumps({'license': license_names_to_spdx[license]})) | ||
| f.write(f"license-files = {json.dumps(['LICENSE'])}\n") |
There was a problem hiding this comment.
Adding a dedicated license-files = ['LICENSE'] line to pyproject.toml does have the benefit that it's directly visible to the user. No need to lookup what the exact key is.
I'd suggest to keep it as is.
There was a problem hiding this comment.
Fair enough, my main complaint was that this didn't allow for an extension, so perhaps?:
| f.write(f"license-files = {json.dumps(['LICENSE'])}\n") | |
| f.write(f"license-files = {json.dumps(['LICENSE*'])}\n") |
There was a problem hiding this comment.
Fair enough, my main complaint was that this didn't allow for an extension
Does it need to though? I believe the value here is designed to match the initial config. If the license file name is changed, flit would also emit an error as the pattern didn't match any file, which would lead the user to update it.
|
Closing, this PR had marginal value, and justifiable concerns have been raised. A |
The default
license-filesglob is['COPYING*', 'LICEN[CS]E*'], which is broader than what's currently set inflit init, importantly permitting file extensions. I think it makes sense to use the default glob here?A