Author Beuc
Recipients Beuc, Simon Biggs, pmpp, serhiy.storchaka, xtreak
Date 2020-05-22.11:21:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590146484.84.0.116061000075.issue40280@roundup.psfhosted.org>
In-reply-to
Content
I've been maintaining a Python Emscripten build for the Ren'Py (game engine) web port:
https://github.com/python-emscripten/python
https://renpy.beuc.net/

I recently tackled Python3 with a minimal/embeddable approach and checking the other ports already pointed in the discussion:
https://github.com/python-emscripten/python/tree/trunk/3.8/
(2 patches, and a short pyconfig.h fix-up)

There is also a Cython module to use the Emscripten C API.

Here's a demo at:
https://www.beuc.net/python-emscripten/demo/3/
(hello-world size: 3MB, with a few common modules: 4MB)

I can provide a pull request with a first few core changes.
Should this be done on github?

-

cross-compilation handling appears to follow an incorrect logic, in particular by querying 'dpkg' or parsing compiler output to detect include paths -- it is the (cross-)compiler's responsibility to provide the system paths, and detecting them manually causes conflicts. I had to patch setup.py. Let me know if I missed something.

Usually cross-compiling is triggered by non-matching build-type/host-type. Here cross-compilation logic is apparently triggered when exporting _PYTHON_HOST_PLATFORM=xxx manually (it's in the Makefile but not exported, and breaks normal build when exported). Is this the way it's meant to be used?
History
Date User Action Args
2020-05-22 11:21:24Beucsetrecipients: + Beuc, pmpp, serhiy.storchaka, xtreak, Simon Biggs
2020-05-22 11:21:24Beucsetmessageid: <1590146484.84.0.116061000075.issue40280@roundup.psfhosted.org>
2020-05-22 11:21:24Beuclinkissue40280 messages
2020-05-22 11:21:24Beuccreate