library linking from python plugin

21 views
Skip to first unread message

Evan Molinelli

unread,
Oct 31, 2016, 11:54:04 AM10/31/16
to Python Programming for Autodesk Maya
Hi all,

 I'm trying to use a 3rd party library (in this case Pillow) which has binary dependencies (libjpg -version 9). I can easily get this working on MY machine by (1) brew install libjpg, (2) pip install Pillow, and (3) adding the Pillow site-packages directory to maya's python path. 

The issue I'm having is how to package my python plugin with its Pillow dependency. I've built the Pillow package for mac os and windows x64 (the machines I know I need to support) and on initialization I add the relevant folders to the path and that all seems to work. 

The problem is that I need to include machine dependent builds of the libjpg library and then link them on initialization. I've found this reference

but I am unsure how and where to actually DO the linking for macs. Something like using "install_name_tool" maybe?

Any assistance would be greatly appreciated.

Evan Molinelli

unread,
Oct 31, 2016, 12:07:44 PM10/31/16
to Python Programming for Autodesk Maya
Ok, 

I've managed to fix this issue in a slightly different way. I discovered that the dylib files my installation was searching for were not packaged with the plugin code due to the fact that they were in a hidden directory and hidden directories were not included in my git commits.

At the end of the day, it was as simple as copy and committing ALL site-package contents!
Reply all
Reply to author
Forward
0 new messages