Python, Be Bold!
Greg Ewing <greg.ewing at canterbury.ac.nz>:
> You can pass a zip file with a .pyz extension to the python
> interpreter and it will look for a __main__.py file and run
This discussion has been interesting, and I've now learned about zipapp.
This is really nice and will likely be a favorite distribution format
for Python applications.
My initial instinct would be to use zipapp as follows:
* The starting point is a directory containing the Python source files,
possibly with subdirectories. (A simple, two-file example:
Be sure that "myapp.py" contains the boilerplate footer:
if __name__ == '__main__':
* Test that the program works:
* Generate the zipapp:
$ python3 -m zipapp . -o ../myapp.pyz --main myapp:main \
-p "/usr/bin/env python3"
* Try it out: