python-tcod icon indicating copy to clipboard operation
python-tcod copied to clipboard

Can't build wheels from source on MacOS.

Open HexDecimal opened this issue 3 years ago • 0 comments

Wheels built for MacOS require the delocate tool to be run on them. Otherwise SDL will not be bundled with the wheel. Deployments run this tool outside of the normal wheel build process, kind of like how auditwheel works.

This means that while the pre-built MacOS wheels on PyPI are correct, any wheels built from source independently will be missing the SDL library. This will result in the following error when you try to import tcod:

ImportError: dlopen(.../site-packages/tcod/\_libtcod.abi3.so, 2): Library not loaded: @rpath/SDL2.framework/Versions/A/SDL2
  Referenced from: .../site-packages/tcod/\_libtcod.abi3.so
  Reason: image not found

My long term plans are to move the bundled SDL libs to another project and handle the issue there.

HexDecimal avatar Jun 08 '21 23:06 HexDecimal