Comment by elbear
19 days ago
I keep meaning to investigate how I can use your tools to create single-file executables for Python projects, so thanks for posting and reminding me.
19 days ago
I keep meaning to investigate how I can use your tools to create single-file executables for Python projects, so thanks for posting and reminding me.
My early contributions to https://github.com/jart/cosmopolitan were focused towards getting a single-file Python executable. I wanted my Python scripts to run on both Windows and Linux, and now they do. To try out Python, you can:
Adding pure-Python libraries just means downloading the wheel and adding files to the binary using the zip command:
Cosmopolitan Libc provides some nice APIs to load arguments at startup, like cosmo_args() [1], if you'd like to run the Python binary as a specific program. For example, you could set the startup arguments to `-m datasette`.
[1]: https://github.com/jart/cosmopolitan/commit/4e9566cd3328626d...