Closed paulmueller closed 5 years ago
Awesome! Out of curiosity, how does this work with PyInstaller? Does it place the binary relative to the root application directory and have pkg_resources
point at it?
Yes, the binary is placed in root/imageio_ffmpeg/binaries
and root
apparently is the first location where the frozen app looks for libraries (In that sense, it would also work without pkg_resources
. However, I don't know whether __file__
is well-defined for frozen apps and therefore pkg_resources
is definitely the cleaner solution).
I removed
LIB_DIR
, because it is not used anywhere. I addbin_dir
in the function, because it triggers an extraction of the binary (if applicable) and should not happen when importing the module. For instance, people might want to use their own exes anyway and not want to wait for pkg_resources to extract another one.closes #7