shared libproj; tests and rebuild for pyproj - #6239
Merged
Merged
Conversation
MMesch
force-pushed
the
shared-libproj
branch
3 times, most recently
from
August 11, 2026 16:43
9bf2b77 to
6d1c52a
Compare
Switch BUILD_SHARED_LIBS to ON and drop VERSION/SOVERSION on emscripten so libproj.so is unversioned. wasm-ld seems to link by raw filename without understanding of semantic versions or symlink deduplication. This can lead to loading the same library several times, possibly leading to strange errors if each instance deals with different state. Same pattern as in HDF5 (emscripten-forge#6007).
Bump the proj host pin from 9.7.1 to 9.8.1 and PROJ_VERSION to match. Drop the explicit pip host requirement: cross-python seems to provide its own pip in the build-time venv, and adding a second pip from conda-forge lets the two installs collide (mismatched _internal submodules cause ImportError at pip startup). With proj shared, each pyproj cython .so shrinks from ~11.7 MB to under 400 KB. Total package: 118 MB -> 1.5 MB uncompressed, 22 MB -> 269 KB compressed.
The previous test only imported Proj and transform, which passes even if most of pyproj's compiled modules are broken. Add tests that hit each cython .so with a numerical check: CRS lookup, WKT roundtrip, WGS84 to Web Mercator transformer, roundtrip precision, geodesic distance, and a proj.db database query.
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.
Template B: Checklist for updating a package
[] Or reset build number to 0 if updating the package to a newer versionPR Formatting
Add [package-name]orUpdate [package-name] to [version](unsure since this isn't a package update)Package Details
Build Notes