-
Notifications
You must be signed in to change notification settings - Fork 245
Reduce wheel size by excluding source files #1588
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Contributor
Author
|
/ok to test 17c0179 |
17c0179 to
2881d2b
Compare
Contributor
Author
|
/ok to test 2881d2b |
This comment has been minimized.
This comment has been minimized.
Contributor
Author
cuda_core wheel contents (cp311-linux-x86_64) |
Contributor
Author
cuda_bindings wheel contents (cp311-linux-x86_64) |
Use opt-in package-data approach to control what goes into wheels: - Set include-package-data = false to prevent MANIFEST.in auto-inclusion - Explicitly include only .pxd files (for downstream cimport) and headers cuda_core wheel size reduced from ~5 MB to ~1.6 MB (68% reduction). Also fix MANIFEST.in for both packages to include all files needed for sdist builds (headers, template files). Co-authored-by: Cursor <cursoragent@cursor.com>
2881d2b to
0645cce
Compare
Contributor
Author
|
/ok to test 0645cce |
leofang
approved these changes
Feb 11, 2026
Contributor
Author
|
/ok to test ec8ef83 |
This comment has been minimized.
This comment has been minimized.
1 similar comment
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cuda.bindings
Everything related to the cuda.bindings module
cuda.core
Everything related to the cuda.core module
P0
High priority - Must do!
packaging
Anything related to wheels or Conda packages
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Use opt-in package-data approach to control what goes into wheels, significantly reducing wheel size:
include-package-data = falseto prevent MANIFEST.in auto-inclusion.pxdfiles (for downstream cimport),.pxifiles (included by.pxdfiles), and required headerscuda_core wheel size reduced from ~5 MB to ~1.6 MB (68% reduction)
Closes #766
Changes
cuda_core:
MANIFEST.in: Added_includeheaders for sdist buildspyproject.toml: Opt-in package-data for.pxdand headers onlycuda_bindings:
MANIFEST.in: Added template files (.pyx.in,.pxd.in,.pxi.in) and.hfor sdistpyproject.toml: Opt-in package-data for.pxd,.pxi(needed because.pxdfiles useincludedirectives), and headersWheel contents after change
Included:
.so/.pyd(compiled extensions).py(Python source).pxd(for downstreamcimport).pxi(cuda_bindings only - required by.pxdfiles that useincludedirectives).pxdfilesExcluded:
.pyx(Cython source).pxi(cuda_core only - these are included from.pyxfiles, not.pxd).cpp(generated C++ files).pyx.in,.pxd.in,.pxi.in)Test plan
Made with Cursor