Hello,
I'm trying to package an app that depends heavily on graphviz and pygraphviz. The dependencies do not get automatically pulled in as there is to pygraphviz hook. I would like to write one but need some guidance.
I stared with a simple hook to include the graphviz executables along with the dynamic libararies (I'm on macos and linux, but will include only the macos lines here)...
binaries=[
('/usr/local/bin/dot', '.'),
('/usr/local/bin/nop', '.'), #There are others to include (e.g. neato).
('/usr/local/Cellar/graphviz/*/lib/*.dylib', '.'),
('/usr/local/Cellar/graphviz/*/lib/graphviz/*.dylib', 'graphviz'),
] #+ libs
datas=[
('/usr/local/Cellar/graphviz/*/lib/graphviz/config6', 'graphviz'),
]
This is not sufficient, since graphviz depends on packages like libtool (that's the name in brew) so I add ` ('/usr/local/Cellar/libtool/*/lib/*.dylib', '.'),` to the list of binaries. Yet there are a ton of dependencies for graphviz:
=> brew deps graphviz
cairo
fontconfig
freetype
fribidi
gd
gdbm
gettext
glib
graphite2
gts
harfbuzz
icu4c
jasper
jpeg
libffi
libpng
libtiff
libtool
lzo
netpbm
openssl@1.1
pango
pcre
pixman
python
readline
sqlite
webp
xz
I assume that there is a function in pyinstaller that would recursively include dynamic libraries but I haven't found it. For example, the function `depend.bindepend.findSystemLibrary`, which I assume would be used by such a recursive function is only called in gi.py, and nowhere else. Are we expected to write this function ourselves?
Thanks for the help!