psobot / keynote-parser

A packer/unpacker for Apple Keynote presentation files.
158 stars 17 forks source link

macOS with Snappy lib installed by Homebrew - what to do when you have "fatal error: 'snappy-c.h' file not found". #47

Closed am1006 closed 1 year ago

am1006 commented 1 year ago

Hi friends,

I'm writing down this issue to record my solution to the following error when trying to install this library using Poetry (on Mac OS X, with the Snappy library installed by Homebrew):

snappy/snappymodule.cc:31:10: fatal error: 'snappy-c.h' file not found

The problem here is that clang can't find the snappy library installed by homebrew. To make it work, you simply need to add a CPPFLAG:

CPPFLAGS="-I/usr/local/include -L/usr/local/lib" poetry add keynote-parser

I've tested it only with poetry. But I hope it will help you are using pip.

am1006 commented 1 year ago

Mark this as closed. But I welcome any follow ups.