Closed bitsgalore closed 6 years ago
Import problems with binaries are fixed by https://github.com/openpreserve/jpylyzer/commit/cba3201f0272e5b52bf34119e0a4cbf46f8afb4b
Solution was to import module as a whole instead of individual functions/classes. Not entirely sure why this even works.
TODO:
Additional resources on import issues
Distributing a Python command line application - includes link to template package, looks like exactly the kind of thing we need here!
BUT packaging this way results in following error in PyInstaller-packaged binaries:
Traceback (most recent call last):
File "jpylyzer/jpylyzer.py", line 47, in <module>
from . import config as config
SystemError: Parent module '' not loaded, cannot perform relative import
Failed to execute script jpylyzer
Possible solution here: Pyinstaller with relative imports
Update: modified imports / structure according to links mentioned above: https://github.com/openpreserve/jpylyzer/tree/test-structure
This creates 2 new problems:
-m
option (annoying but no major issue)-m
, done in: https://github.com/openpreserve/jpylyzer/commit/213860d2ed54f819ff90a3a9ad492e6dca99bbe8 Following changes fix all of the above issues (cli.py is now compilation target and can be used as convenience wrapper also) https://github.com/openpreserve/jpylyzer/commit/4dcd726abb5b55514c2e5947275cfa28eac6eef0
After installing Windows binaries for 1.18.0b5 on Wine, the following error is reported after launch:
Check on proper windows machine, looks like the old relative import problem rearing its ugly head again.
ALSO check if this problem occurs with the pip install om Windows.