pyodide/cpython
Hood Chatham 1335d7ee64
Add argument handling and _run_main function (#3021)
The command line runner in #2976 finally works, but it is a large change set so
I am planning to split it up. This is the first PR split off from there.

This PR adds a patch to Python to expose pymain_run_python. We cannot use the
public API Py_RunMain for this purpose because it finalizes the Python
interpreter with Py_FinalizeEx when it is done. If we start an async task with
Py_RunMain then it will segfault. pymain_run_python does a large amount of work
and reproducing it is undesirable.

I added an args parameter which accepts command line arguments. The private
entry point pyodide._main._run_main() executes the main Python entrypoint
without shutting down the interpreter and returns the return code.
2022-08-30 08:49:06 -07:00
..
patches Add argument handling and _run_main function (#3021) 2022-08-30 08:49:06 -07:00
Makefile Unvendor sqlite3 from stdlib (#2946) 2022-08-22 08:52:50 +09:00
README.md Link to @dgym 2019-03-18 21:33:32 -07:00
Setup.local Unvendor sqlite3 from stdlib (#2946) 2022-08-22 08:52:50 +09:00
adjust_sysconfig.py MAINT Use the patched version of setuptools-rust (#2735) 2022-06-20 09:28:19 +09:00
checksums Python 3.10 (#2225) 2022-03-17 15:48:56 -07:00
config.site Update to Python 3.8.2 (#712) 2020-07-07 16:21:33 +02:00
pyconfig.undefs.h Use emscripten 3.1.13 (#2679) 2022-06-10 22:26:10 +02:00
remove_modules.txt Unvendor sqlite3 from stdlib (#2946) 2022-08-22 08:52:50 +09:00

README.md

Credits

Based on the hard work of @dgym on cpython-emscripten.