Skip to content

Dist setup#9

Merged
namingbe merged 6 commits into
masterfrom
dist-setup
Jun 13, 2026
Merged

Dist setup#9
namingbe merged 6 commits into
masterfrom
dist-setup

Conversation

@namingbe

Copy link
Copy Markdown
Collaborator

No description provided.

namingbe and others added 6 commits June 13, 2026 14:37
0.2.3 shipped a cp314-tagged platform wheel with no _rust binary inside:
the try/except on setuptools_rust silently zeroed the extension list when
the package was absent from the build shell, and optional=True swallowed
compile failures (PyO3 0.20 couldn't target 3.14 anyway). The result
installed only on the exact arch it was mistagged for and ran the Python
fallback regardless.

Decouple tag from build accident:
- Gate the Rust extension on NSV_BUILD_RUST=1. Default build is pure and
  emits an honest py3-none-any wheel; the runtime try/except in core.py
  still falls back to Python, so end users never need Rust.
- optional=False under the gate: a build that explicitly asked for Rust
  fails loudly instead of producing a mistagged pure wheel.
- find_packages(exclude=tests*) so the test suite stops leaking into
  site-packages as a top-level package.
- Drop zip_safe=False (forced Root-Is-Purelib: false) and the redundant
  setup_requires; remove setuptools-rust from unconditional build requires
  so the default PEP-517 build is pure.

Verified on this machine: default -> py3-none-any (no binary, no tests);
NSV_BUILD_RUST=1 -> cp314 wheel with nsv/_rust.so, Rust path active at
runtime. Both backends agree on all 1093 nsv-tests enum fixtures and the
92MB champernowne fixed-point roundtrip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- archs=auto64: the 32-bit i686 manylinux build failed (rustup-init can't
  load libatomic.so.1 in that container) and isn't a target we ship.
- macos-15 (arm64) + macos-15-intel (x86_64): macos-13 is retired and never
  schedules; keep both arches on one OS version.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@namingbe namingbe merged commit 099bb2e into master Jun 13, 2026
13 checks passed
@namingbe namingbe deleted the dist-setup branch June 13, 2026 15:49
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