Closed MyLoginOnGitHub closed 3 years ago
Hi @MyLoginOnGitHub, nice idea. Let me some time to check it and I will merge it. :)
We lose the python 2 support with the super function, I don't know if it's a problem. I know it's not used anymore but on some old server it could be useful.
I merge it, if it's needed one day, we will think on keeping the python 2 support. Not sure it's important know.
Thanks again. If you want to do it on Windows and Mac it would be great.
I fixed changes to support python2 in #561. You are welcome :)
As mentioned in #558, I think it is good idea to try to run LaZagne with modules available on current system.
This PR does not resolve this issue, but just demonstrates proof of concept that it could be done without editing modules itself. For completely resolve it same thing should be done for Windows and MacOS. This PR is only affects Linux.
I used dynamically import for all modules. Failed to import modules are appeared in category
unused
. If they a called (with optionall
) they call methoderror
and pass meassage with exception as parameter.I also provide hook for PyInstaller. It need to set parameter
--additional-hooks-dir
for PyInstaller. Example:pyinstaller --additional-hooks-dir=. --onefile ./laZagne.py
I have tested this code. If @AlessandroZ think this is good enough, I could do the same for Windows. I also could do the same for MacOS, but I could not test this.