Skip to content

0.3.0: install() and wheels for more Pythons and platforms - #3

Merged
p-ramcharan-dev merged 2 commits into
mainfrom
wheels-install-0.3.0
Nov 10, 2026
Merged

p-ramcharan-dev merged 2 commits into
mainfrom
wheels-install-0.3.0

Conversation

@p-ramcharan-dev

@p-ramcharan-dev p-ramcharan-dev commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

What changes

fastrectpack.install() makes rectpack itself hand out the accelerated classes, so a library that uses rectpack internally gets faster without being edited:

import fastrectpack
fastrectpack.install()

It swaps the four MaxRects classes in rectpack, rectpack.maxrects and rectpack.packer, and rewrites the default pack_algo of newPacker and 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

  • 1,045 tests. In this PR's wheel run the full suite, with numpy installed, passed inside each of the 49 wheels. The Intel Mac wheels were tested under Rosetta, not on Intel hardware.
  • tests/test_install.py runs all 200 packer configurations through the patched rectpack and checks uninstall() restores everything.
  • The sanitizer job now installs numpy, so the float and numpy tests run under ASan and UBSan too. That change is first exercised by this PR's latest commit.

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

@p-ramcharan-dev
p-ramcharan-dev marked this pull request as ready for review November 10, 2026 13:02
@p-ramcharan-dev
p-ramcharan-dev merged commit f474cb0 into main Nov 10, 2026
16 checks passed
@p-ramcharan-dev
p-ramcharan-dev deleted the wheels-install-0.3.0 branch November 10, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant