-
-
Notifications
You must be signed in to change notification settings - Fork 372
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
Support specifying the license file in the pyproject.toml file #1812
Conversation
048bd37
to
62331ea
Compare
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.
Summary of in-person discussion: This is great; however, we probably want to:
- Preserve the PEP621 structure of the
license
field as a dictionary - If the
file
sub-field is used, use that as the file name (rather than a separatelicense_file
field) - If the
text
sub-field is used, output that text as aLICENSE
file - possibly with a warning if the text doesn't appear to be a full license text - If
license
is a bare string (which will be the legacy behavior from older Briefcase projects), issue a warning and convert it tolicense = {"file": "LICENSE"}
, since we know the license will be a file.
62331ea
to
96734be
Compare
2afd560
to
1fcaa9e
Compare
Signed-off-by: Yngve Mardal Moe <yngve.m.moe@gmail.com> Signed-off-by: Marie Roald <roald.marie@gmail.com> Co-authored-by: Yngve Mardal Moe <yngve.m.moe@gmail.com>
1fcaa9e
to
67575d4
Compare
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.
Looks good! There's obviously a few gaps related to license.text handling, but those are going to be difficult to address without a fix for #1829. I'll take a swing at some of the language in the error messages before this lands, but otherwise, I think this is good to land!
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've tweaked the error and warning text, so we're good to go! Thanks for the contribution
Briefcase can now read the
project.license.file
-key in thepyproject.toml
file. Without this PR, the license file name is hard-coded to "LICENSE". This is relevant for linux builds, where the license file is included in the built package. With this PR, it still defaults to "LICENSE", but ifproject.license.file
is set inpyproject.toml
, then that file is used instead.This is related to the LICENSE file handling in #1235
PR Checklist: