Repository navigation
0.3.0: install() and wheels for more Pythons and platforms - #3
Merged
Merged
Conversation
…3.14, 3.15, Linux ARM, Intel Mac, musl Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changes
fastrectpack.install()makesrectpackitself hand out the accelerated classes, so a library that uses rectpack internally gets faster without being edited:It swaps the four MaxRects classes in
rectpack,rectpack.maxrectsandrectpack.packer, and rewrites the defaultpack_algoofnewPackerand each packer class.uninstall()reverses it. With it active, gdsfactory's_pack_single_bin(copied unedited) packed 400 rectangles in 0.012 s instead of 3.06 s with an identical result (one timing, one laptop).More wheels. 49 instead of 15: adds Python 3.14 and 3.15, Linux ARM64, Alpine/musl (x86_64 and ARM64) and Intel Macs.
Checks
tests/test_install.pyruns all 200 packer configurations through the patchedrectpackand checksuninstall()restores everything.Not covered
Windows on ARM, 32-bit systems and free-threaded Python have no wheels.
A substantial part of this change was written with an AI assistant.
🤖 Generated with Claude Code