-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-48983: [Packaging][Python] Ensure and add LICENSE.txt and NOTICE.txt to Python wheels #48988
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
base: main
Are you sure you want to change the base?
Conversation
|
|
|
@github-actions crossbow submit wheel-313--amd64 |
|
Revision: 070ac9d Submitted crossbow builds: ursacomputing/crossbow @ actions-b8c9cec4c2 |
|
@github-actions crossbow submit wheel-manylinux-2-28-cp313-cp313-amd64 |
|
Revision: 9566c3b Submitted crossbow builds: ursacomputing/crossbow @ actions-9fe4dfb4ec
|
|
@github-actions crossbow submit wheel-manylinux-2-28-cp313-cp313-amd64 |
|
Revision: 8ae2c1c Submitted crossbow builds: ursacomputing/crossbow @ actions-722266c345
|
|
@github-actions crossbow submit wheel-313 |
|
Revision: 8ae2c1c Submitted crossbow builds: ursacomputing/crossbow @ actions-a71739e7f4 |
|
I have tried to copy using some custom copying on setup.py trying to override Similar to how we currently do The jobs validate now that the wheels contain both |
|
AFAIU, modern build frontends (such as build) build the wheel from the sdist, should we do just that? Either by switching to a modern build frontend, or at worse by unpacking the sdist ourselves :-) It also ensures that we're shipping consistent contents in both formats, and that we're not missing anything in the sdist. |
This reverts commit 9566c3b.
…anually copying licenses
|
@github-actions crossbow submit wheel-manylinux-2-28-cp313-cp313-amd64 |
|
Revision: be696f2 Submitted crossbow builds: ursacomputing/crossbow @ actions-0fbd22f993
|
| license = [ | ||
| info.filename for info in f.filelist if re.search( | ||
| r'LICENSE.txt$', info.filename | ||
| ) | ||
| ] | ||
| assert license, "LICENSE.txt is missing from the wheel." | ||
| notice = [ | ||
| info.filename for info in f.filelist if re.search( | ||
| r'NOTICE.txt$', info.filename | ||
| ) | ||
| ] | ||
| assert notice, "NOTICE.txt is missing from the wheel." |
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.
Nit:
| license = [ | |
| info.filename for info in f.filelist if re.search( | |
| r'LICENSE.txt$', info.filename | |
| ) | |
| ] | |
| assert license, "LICENSE.txt is missing from the wheel." | |
| notice = [ | |
| info.filename for info in f.filelist if re.search( | |
| r'NOTICE.txt$', info.filename | |
| ) | |
| ] | |
| assert notice, "NOTICE.txt is missing from the wheel." | |
| for filename in ('LICENSE.txt', 'NOTICE.txt'): | |
| assert any(info.filename.endswith(filename) for info in f.filelist), \ | |
| f"{filename} is missing from the wheel." |
rok
left a comment
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.
Just a minor yak shave
I switched to build on the last commit and we don't seem to be adding the LICENSE.txt and NOTICE.txt files either, that's why it fails: https://github.com/ursacomputing/crossbow/actions/runs/21394020272/job/61587723641 |
Yet this seems to be building a sdist, so perhaps something is wrong in our sdist building configuration? Apparently you can debug this using Also we'll certainly want to pass |
Rationale for this change
Currently the files are missing from the published wheels.
What changes are included in this PR?
Are these changes tested?
Yes, via archery.
I've validated all wheels will fail with the new check if LICENSE.txt or NOTICE.txt are missing:
Are there any user-facing changes?
No