Building Standalone Python Applications with PyOxidizer
Hey Python developers, I just published the initial release of PyOxidizer - a utility for producing self-contained, potentially single file executable Python applications. You can read more about it at https://gregoryszorc.com/blog/2019/06/24/building-standalone-python-applicat... I wanted to draw this list's attention to it because I think PyOxidizer could have significant implications for the Python community. And the 2nd to final section in the blog post is of particular relevance to CPython's development team. I want to state explicitly that I would prefer to work with the Python community in whatever appropriate capacity is needed to advance the state of Python application distribution. (I have already participated in discussions about PEP 587.) PyOxidizer is still young and there's a long way to go. But I would love to e.g. implement PyOxidizer with an eye towards incorporation in official Python packaging tools a few years down the road. I'm not too familiar with the various day-to-day happenings of Python and Python Packaging. But if you steer me in the right direction, I could start getting involved... I hope you like PyOxidizer! Gregory Szorc gregory.szorc@gmail.com
Day-to-day packaging stuff seems to have migrated from distutils-sig maililng list to https://discuss.python.org/c/packaging. And congrats on the release!
Congrats on this new tool -- I'll be checking it out. With a quick glance
at the docs, I see this:
"""
PyOxidizer loads everything from memory and there is no explicit I/O being
performed. When you import a Python module, the bytecode for that module is
being loaded from a memory address in the executable using zero-copy. This
makes PyOxidizer executables faster to start and import - faster than a
python executable itself!
"""
This made me think of a recent thread either here or on python-ideas about
optimizing the cPython start up time. In particular the idea of bundling
the core parts of the stdlib pre-loaded somehow. Multiple options were
discussed, but as far as I know no one actually prototyped any of them.
But it looks like you've done that.
My question is this: Can you use PyOxidizer partway -- that is, bundle up
some modules, while keeping the regular module loading system for
everything else. If so, then one could build an executable with all the
modules that always get loaded. It's quite a list judging from:
$ python -c "import sys; print(len(sys.modules))"
55
How much faster is the start up time when you make an exe that does, well,
nothing.
Also -- I have some vague memory of there being a mailing list for the
various "bundlers": py2exe, py2app, PyInstaller, etc... it would be good to
engage that community, it really is a bit different than the usual
"packaging" community, which is primarily focused on python packages
themselves rather than applications.
-CHB
On Mon, Jun 24, 2019 at 11:06 AM Gregory Szorc
Hey Python developers,
I just published the initial release of PyOxidizer - a utility for producing self-contained, potentially single file executable Python applications. You can read more about it at https://gregoryszorc.com/blog/2019/06/24/building-standalone-python-applicat...
-- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov
participants (3)
-
Brett Cannon
-
Chris Barker
-
Gregory Szorc