tFixup to get PyQt5 5.10 working ok and looking right on Mac - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 6b09d478a5d29dbae5181c61dabcfd7c2efd0bc2 DIR parent 7ff32877f7062bef773b48d56c92cb06b08e10ce HTML Author: Calin Culianu <calin.culianu@gmail.com> Date: Thu, 15 Feb 2018 14:01:00 +0200 Fixup to get PyQt5 5.10 working ok and looking right on Mac Diffstat: M contrib/build-osx/osx.spec | 17 ++++++++++++++++- M contrib/deterministic-build/requir… | 5 ++--- 2 files changed, 18 insertions(+), 4 deletions(-) --- DIR diff --git a/contrib/build-osx/osx.spec b/contrib/build-osx/osx.spec t@@ -1,6 +1,6 @@ # -*- mode: python -*- -from PyInstaller.utils.hooks import collect_data_files, collect_submodules +from PyInstaller.utils.hooks import collect_data_files, collect_submodules, collect_dynamic_libs import sys import os t@@ -40,6 +40,20 @@ datas += collect_data_files('trezorlib') datas += collect_data_files('btchip') datas += collect_data_files('keepkeylib') +# We had an issue with PyQt 5.10 not picking up the libqmacstyles.dylib properly, +# and thus Electrum looking terrible on Mac. +# The below 3 statements are a workaround for that issue. +# This should 'do nothing bad' in any case should a future version of PyQt5 not even +# need this. +binaries = [] +dylibs_in_pyqt5 = collect_dynamic_libs('PyQt5', 'DUMMY_NOT_USED') +for tuple in dylibs_in_pyqt5: + # find libqmacstyle.dylib ... + if "libqmacstyle.dylib" in tuple[0]: + # .. and include all the .dylibs in that dir in our 'binaries' PyInstaller spec + binaries += [( os.path.dirname(tuple[0]) + '/*.dylib', 'PyQt5/Qt/plugins/styles' )] + break + # We don't put these files in to actually include them in the script but to make the Analysis method scan them for imports a = Analysis([electrum+MAIN_SCRIPT, electrum+'gui/qt/main_window.py', t@@ -57,6 +71,7 @@ a = Analysis([electrum+MAIN_SCRIPT, electrum+'plugins/keepkey/qt.py', electrum+'plugins/ledger/qt.py', ], + binaries=binaries, datas=datas, hiddenimports=hiddenimports, hookspath=[]) DIR diff --git a/contrib/deterministic-build/requirements-binaries.txt b/contrib/deterministic-build/requirements-binaries.txt t@@ -1,5 +1,5 @@ pycryptodomex==3.4.12 -PyQt5==5.9 +PyQt5==5.10 sip==4.19.7 six==1.11.0 -websocket-client==0.46.0 -\ No newline at end of file +websocket-client==0.46.0