flexxui / pscript

Python to JavaScript compiler
http://pscript.readthedocs.io
BSD 2-Clause "Simplified" License
256 stars 25 forks source link

pscript not compatible with kivy #38

Open manatlan opened 5 years ago

manatlan commented 5 years ago

Hi, first of all : I love pscript, and use it a lot in things like wuy/guy (https://github.com/manatlan/wuy). It let me build python component for vuejs ...

But I found a trouble that I can't bypass easily ...

You can't include "import pscript" in a kivy/buildozer android app. This statement crash the kivy app when started on android. (with pscript included in buildozer specs, or pscript imported as pure python3) I don't know why, and can't figure out how to spot the trouble (I don't know how to debug android kivy app)

It's not very important, because I'm not really need to deploy "python vue components" in an android apk webview.

But I would like to tell you about this ...

There seems to be something which broke kivy at importing time.

almarklein commented 5 years ago

PScript tries to extract the source code of Python code using the inspect module. But for this to work, the .py files need to be available. This is a problem when freezing apps with PyInstaller for instance. I would not be surprised if your issue is related to this too.

GUY looks very interesting, btw :)