On Sat, Nov 21, 2020 at 4:04 PM Greg Ewing
conda is similar -- there is even the "conda constructor" that will build an installer for a conda environment that meets your specs. But the fact is that you get a LOT of extra stuff along with what you need.
My thinking is that you would only add things to the venv that your app needs, as and when you discover that they're needed. E.g. you wouldn't add the whole of PyObjC at once, just the submodules you use.
but unfortunately, that's not how most python packages are set up -- you install the whole thing at once. As an example, it's really tricky to use even one function from scipy without installing the whole thing. And that's in fact where the complications come in for the bundlers -- if you use PIL, you get all of tkInter. If you use matplotlib, you may get all of QT and who knows what other back ends. And there is the other complication that if you have a virtualenv or conda environment, you still need a single file that looks like an application to start the whole thing up -- with an icon and all that. I recently revisited this for an application that used a Browser interface with a Python server that we wanted to bundle as a desktop app (using Electron to provide the app wrapper and browser). conda constructor really didn't help -- it was easier to use PyInstaller for the Python part, and we got amore compact system. -CHB
While this would be more work for the developer, it would allow the packaging tool to be far simpler and easier to maintain.
Another benefit of working this way is that it's easier to be sure that the package you create will work on machines other than the one you developed it on. If it runs in your development environment, it should run elsewhere too.
-- 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/T27AYT... Code of Conduct: http://python.org/psf/codeofconduct/
-- Christopher Barker, PhD Python Language Consulting - Teaching - Scientific Software Development - Desktop GUI and Web Development - wxPython, numpy, scipy, Cython