Skip to content

Try system python when performing compileall#1109

Merged
inclement merged 2 commits intokivy:masterfrom
inclement:try_system_python_compile
Sep 23, 2017
Merged

Try system python when performing compileall#1109
inclement merged 2 commits intokivy:masterfrom
inclement:try_system_python_compile

Conversation

@inclement
Copy link
Member

@inclement inclement commented Sep 5, 2017

This is kind of messy, but there doesn't seem to be a very neat way to do it.

The point of doing this is that the compileall can fail for some files if it tries to load .so files (which hostpython doesn't have available). In particular, this occurs for files which try to access unicode characters with '\N{...}'. For instance, several files in sympy do this, and currently crash when sympy is imported on the device. This PR would make the compilation work in such cases.

For now, I think discussion would be better than straight merging, but having the change documented could help someone.

@inclement inclement added this to the 0.6 milestone Sep 5, 2017
@inclement inclement changed the title Try system python compile Try system python when performing compileall Sep 5, 2017
@inclement
Copy link
Member Author

inclement commented Sep 5, 2017

I suppose another thing we could do is detect files for which compilation has failed, and automatically whitelist their .py versions (these should work okay when actually on the device). This might be a good general solution, along with also flagging this problem to the user.

@inclement inclement merged commit 922625c into kivy:master Sep 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant