
On 20 Nov 2020, at 14:45, Greg Ewing <greg.ewing@canterbury.ac.nz> wrote:
On 20/11/20 9:17 pm, Andrew Svetlov wrote:
Digging into the problem more, I've figured out that PyInstaller has hooks <https://github.com/pyinstaller/pyinstaller/tree/develop/PyInstaller/hooks> for a bunch of popular libraries to make them work.
I've seen this sort of thing in other app bundlers too, e.g. last time I looked py2app and py2exe had a bunch of special casing for various libraries.
This is quite a big problem, IMO. It makes these tools very flakey.
What is it about app bundling in Python that makes these things necessary? Something seems very wrong somewhere.
The runtime environment for bundles applications is slightly different than that of a regular install. Two major reasons for hooks in py2app: - Py2app tries to bundle python libraries in a zipfile, but not all libraries support that - Py2app tries to minimise the amount of modules included in the app bundle by looking at the dependency graph through import statements. This can require manual adjustment, either because of hidden imports (in an extension or by use of the __import__ function), or because modules have optional dependencies that aren’t used (a dependency between pydoc and tkinter is a good example of that) There’s bound to be stuff that currently needs hooks, that could be replaced by some (to be designed) generic solution. I’m not sure about the other bundling projects, but I expect that all of them are run by volunteers that have other projects and limited time. A bit like just about every project in the packaging space. Ronald — Twitter / micro.blog: @ronaldoussoren Blog: https://blog.ronaldoussoren.net/
-- Greg _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/LNAZLM... Code of Conduct: http://python.org/psf/codeofconduct/