-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a hook for qtmodern #305
Conversation
Ughh, I'm seeing Windows+onefile only failures. This looks like a nightmare to debug. |
I don't think the proposed import-only test will catch the missing data files, as those are accessed only when import sys
from PyQt5 import QtCore, QtWidgets
import qtmodern.windows
import qtmodern.styles
app = QtWidgets.QApplication(sys.argv)
window = QtWidgets.QWidget()
window.setWindowTitle("Hello world!")
modern_window = qtmodern.windows.ModernWindow(window)
modern_window.show()
qtmodern.styles.dark(app)
QtCore.QTimer.singleShot(1000, app.quit)
app.exec() or even without the last two calls, as we do not really need to start the event loop (nor quit it via timer) for this test. |
It's not onefile per se that's problematic, but rather the PyQt5-based test that comes second. Which probably means that PyQt5 was first imported within the first test, and the second test somehow lost the PATH modification that happened during the import... |
And the "somehow" part boils down to I suppose if we want to use PyQt5 in tests here, we will have to do explicit import outside of the tests, same as we do in main repository's tests... |
Something I never understood - where do the PyQt5 DLL paths get added to the master process's |
Yeah, it should... But what actually happens is that
|
Ahh so |
Would there be too much overhead if we @isolated.decorate the whole function, and removed the |
Although that's applicable only to |
@sanzoghenzo I'm afraid you're unlucky in that you've just put your foot into a hornet's nest. For now can you put: if is_win:
# This is a hack to prevent monkeypatch from interfering with PyQt5's additional PATH entries. See:
# https://github.com/pyinstaller/pyinstaller/commit/b66c9021129e9e875ddd138a298ce542483dd6c9
try:
import PyQt5
except ImportError:
pass just above your |
I'll fix it ASAP |
Ughh, better make that |
Ahh, you're ahead of me... |
And here's a CI run. The Linux ones failed but that's just because I hadn't enabled Xfvb virtual screen. They pass locally. |
Nice work @sanzoghenzo. |
closes #304