The standard approach does not work:
brew install libtorrent-rasterbar
Will install the boost requirement (linked against the system Python), and libtorrent-rasterbar will install without any Python bindings at all.
How do you fix this?
After lots of digging, googling and trial and error, I've been able to get this all to work. I'm sharing my experiences here in the hope to save others the trouble.
The first step is to make sure that you have your Python properly installed. Check that
Properly linked boost
Check if your boost is linked against the right version of Python using the following command (Change /usr/local to your Homebrew prefix where necessary).
The result should contain the line:
If it points to somewhere in
Once that is done you can run the above line to verify it linked correctly.
Libtorrent-rasterbar with Python bindings
Now that boost is installed properly, libtorrent-rasterbar can use them to build the Python bindings. We have to edit the formula to enable them, but also to educate the build process on where to find them.
The two important lines here are to enable the python bindings with
This will allow the build process to recognize the boost library which was installed in the first step. So close the editor, and do
Finally, to make sure that it all worked: