On 11/13/2017 03:14 PM, Kathrin Sobe wrote:
after quiet some work, the PyInstaller build is running now as well.
Glad to hear that!
Earlier, running the build returned with several errors. PyInstaller cannot handle the way to load classes from sfepy to initialize certain dicts, e.g. terms.__init__
I could circumvent the problem by doing the initialization directly. This reduces the choice of possibilities offered by sfepy, but I am anyway using only a small part.
So just to let you know, with some workarounds and efforts a PyInstaller build is possible with sfepy.
Do you think it would be possible to change the code in such a way that would allow both - dynamic loading of modules, and working with PyInstaller? Could you post somewhere all your required changes? For example, fork the repo on github (if you already had not), create a "pyinstaller" branch, commit your changes, push it to your fork, and point us to it :) Maybe loading the classes somewhere else than in __init__.py might help, or we may come with other ideas.
2017-11-03 22:07 GMT+01:00 Robert Cimrman email@example.com:
On 11/03/2017 04:15 PM, Kathrin Sobe wrote:
do you know if somebody tried to build a python program with sfepy and PyInstaller?
I tried it and build a executable for Windows (.exe) with PyInstaller-3.2.
The build process was fine, but running the program returned with problems during the sfepy imports.
Here is what happens currently when I start the exe file: ... File "site-packages\sfepy__init__.py", line 5, in <module> File "site-packages\sfepy\version.py", line 52, in <module> File "site-packages\sfepy\version.py", line 37, in get_basic_info RuntimeError: cannot determine SfePy top level directory!
In my last post I mentioned problems running sfepy on Windows. Probably its better to solve that first. But I just wanted to ask if you have experiences with PyInstaller.
I have no experience with PyInstaller (and almost zero experience with windows). You are on your own with this topis =:) For windows, we recommend using anaconda.
r. _______________________________________________ SfePy mailing list firstname.lastname@example.org https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/