this is an old post so it may not be relevant anymore but I wrote a PyQt application that uses openslide. Getting it to compile was an absolute nightmare, especially on windows - as you have to include all of the open slide binaries, but it is doable.
I compiled it using pyinstaller, where you can include the openslide dylib file in the command to do the compilation. Below are the commands I would use for each OS to get pyinstaller to work:
# DEPLOY MAC
# sudo pyinstaller -F --windowed -p /Users/callum/callum/QuArray/scripts --add-data "/Users/callum/callum/QuArray/scripts:scripts" --add-binary "/Users/callum/Library/Application Support/pyinstaller/bincache00_py37_64bit/libopenslide.0.dylib:." --icon=scripts/icons/icon.icns QuArray.py
# Windows
# pyinstaller -F --windowed -p C:/Users/callum/QuArray/scripts --add-data "C:/Users/callum/QuArray/scripts;scripts" --icon=scripts/icons/icon.ico QuArray.py
# Linux
# pyinstaller -F -p ~/Documents/QuArray/scripts/ --add-data "scripts:scripts" QuArray.py
As you should expect, linux was the easiest as it doesn't even need the "--add-binary" option!
Windows was of course the most annoying as you need to move all of the dylib files into the working directory...
If you are still working on it then good luck!