pyzo icon indicating copy to clipboard operation
pyzo copied to clipboard

Consider freezing with PyOxidizer

Open almarklein opened this issue 5 years ago • 5 comments

https://github.com/indygreg/PyOxidizer

almarklein avatar Jan 14 '20 08:01 almarklein

See https://github.com/indygreg/PyOxidizer/issues/75 for why this is hard to do with Qt.

almarklein avatar Jan 25 '20 22:01 almarklein

One option could be to freeze a relatively Python build and import additional libs from a special directory, similar how Pyzo is loaded from source even when frozen, but use that to load PySide2 / PyQt5.

But I don't what to copy the whole Qt lib over because it's huge. The hard part would be determining what files to copy over.

almarklein avatar Feb 03 '20 13:02 almarklein

[...] load PySide2 / PyQt5.

Segfault. It does not even say "Panic" :) I was optimistic because of this note in the faq but I reckon the way that the Python lib is build and (Py)Qt is build makes them incompatible ...

Also tried with the python distribution of PyOxidizer (run python repl, append to sys.path, then import PyQt5.QtCore): same.

almarklein avatar Feb 04 '20 15:02 almarklein

Is there a way to debug the segfault? Prerequisites seem to be a debug-version of Python and PyQt, oh my...

Tontyna avatar Feb 04 '20 22:02 Tontyna

Does not seem like it:

$ set RUST_BACKTRACE=1
$ pyoxidizer run
...
...
>>> import sys
>>> sys.version
'3.7.5 (default, Oct 24 2019, 22:47:21) [MSC v.1916 64 bit (AMD64)]'
>>> sys.path.append("c:\\pythons\\python37\\lib\\site-packages")
>>> import PyQt5.QtCore
error: cargo run failed

$

almarklein avatar Feb 05 '20 08:02 almarklein