Skip to content

Linux binary wheels have two copies of libspatialindex #270

@mwtoews

Description

@mwtoews

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions