Skip to content

Publish abi3 wheels; fix C++ linking in source builds#7

Merged
thelgason merged 1 commit into
masterfrom
abi3-wheels
Jun 11, 2026
Merged

Publish abi3 wheels; fix C++ linking in source builds#7
thelgason merged 1 commit into
masterfrom
abi3-wheels

Conversation

@thelgason

@thelgason thelgason commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Problem

Published wheels are tagged cp39-cp39 (CPython 3.9 only), despite the abi3 intent in trie_build.py and the CI comments. Every consumer on Python 3.10+ therefore compiles icegrams from the sdist. Recent setuptools links C++ extensions with the C driver, omitting libstdc++, so those source builds now fail at import time with undefined symbol: __gxx_personality_v0 (seen in Docker deploys on python:3.14-slim).

Changes

  • setup.py: pass py_limited_api = "cp39" to bdist_wheel on CPython (mirrors BinPackage), so cibuildwheel produces a single cp39-abi3 wheel covering CPython 3.9+.
  • trie_build.py: extend the existing PyPy linker workaround to Linux CPython source builds, forcing the C++ link driver so libstdc++ is always linked.
  • Version bump to 1.1.7.

Verification

Built locally: wheel comes out icegrams-1.1.7-cp39-abi3-macosx_15_0_arm64.whl (previously cp39-cp39). Installed that wheel into a Python 3.14 venv: import succeeds and trigram lookups work.

Wheels were tagged cp39-cp39 (CPython 3.9 only) despite the abi3 intent,
so Python 3.10+ always built from the sdist. Pass py_limited_api to
bdist_wheel (as BinPackage does) so a single cp39-abi3 wheel covers
CPython 3.9+.

Also force the C++ link driver on Linux source builds: recent setuptools
links C++ extensions with the C driver, omitting libstdc++ and failing
at import with 'undefined symbol: __gxx_personality_v0'.
@thelgason thelgason requested a review from vthorsteinsson June 11, 2026 08:51
@thelgason thelgason merged commit 5538250 into master Jun 11, 2026
8 checks passed
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