Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux binary wheels have two copies of libspatialindex #270

Closed
mwtoews opened this issue Jul 21, 2023 · 1 comment · Fixed by #276
Closed

Linux binary wheels have two copies of libspatialindex #270

mwtoews opened this issue Jul 21, 2023 · 1 comment · Fixed by #276

Comments

@mwtoews
Copy link
Member

mwtoews commented Jul 21, 2023

Looking at PyPI files for 1.0.1 it seems that the linux versions have two copies of libspatialindex.

For instance Rtree-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl has:

.
├── rtree
│   ├── core.py
│   ├── exceptions.py
│   ├── finder.py
│   ├── index.py
│   ├── __init__.py
│   ├── lib
│   │   ├── libspatialindex_c.so
│   │   └── libspatialindex.so
│   └── py.typed
├── Rtree-1.0.1.dist-info
│   ├── LICENSE.txt
│   ├── METADATA
│   ├── RECORD
│   ├── top_level.txt
│   └── WHEEL
└── Rtree.libs
    └── libspatialindex-91fc2909.so.6.1.1

both Windows and macOS binary wheels only have one copy in rtree/lib.

On Linux, cibuildwheel uses auditwheel to copy external shared libraries. The cibuildwheel stuff should be fixed to not install rtree/lib for Linux, which may require changes to rtree.finder. Or, perhaps the bundled libraries in rtree/lib are preferred and auditwheel's Rtree.libs should be removed somehow.

Presently only the rtree/lib libraries are used from these PyPI binary wheels:

$ python -c "from rtree import finder; print(finder.load())"
<CDLL '/tmp/py39/lib/python3.9/site-packages/rtree/lib/libspatialindex_c.so', handle 56400f603870 at 0x7ff4184bb3a0>
@hobu
Copy link
Member

hobu commented Jul 21, 2023

I think this was an artifact of how the library used to be found and installed. If there's a better/modern way to do this, please update the build configuration.

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 a pull request may close this issue.

2 participants