zionhigt / android-python27

Automatically exported from code.google.com/p/android-python27
0 stars 0 forks source link

Add modules #18

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
How to add new module without setup ex:  PIL and pygame.

Original issue reported on code.google.com by fernando...@gmail.com on 27 Dec 2012 at 7:03

GoogleCodeExporter commented 8 years ago
You would need to add them in the Python build: 
http://code.google.com/p/android-python27/source/browse/#hg%2Fpython-build

You can find info on how to do that there:

- http://bazaar.launchpad.net/~pgs4a-developer/pgs4a/mainline/files
- https://bitbucket.org/gabomdq/ignifuga/src
- https://github.com/kivy/python-for-android/tree/master/recipes

Original comment by anthony....@gmail.com on 27 Dec 2012 at 7:08

GoogleCodeExporter commented 8 years ago
Hi Anthony,
Would you mind expanding on your answer? Also, is it possible to add a 
pre-built for android module (such as one downloaded from here: 
http://code.google.com/p/python-for-android/downloads/list) into the zip files 
directly, or must you start a build from scratch? I have experimented with kivy 
and their build process successfully. Is there a way to use the python build 
created with kivy? I'm pretty new to all of this and unfortunately can't seem 
to research my way to the answer.
Thanks, Megan

Original comment by megan6...@gmail.com on 18 Jan 2013 at 9:31

GoogleCodeExporter commented 8 years ago
> is it possible to add a pre-built for android module (such as one downloaded 
from here: http://code.google.com/p/python-for-android/downloads/list) into the 
zip files directly

Yes you can add pure python modules into python extras zip. Modules with C code 
compiled must be recompiled and linked against libpython2.7.

> I have experimented with kivy and their build process successfully. Is there 
a way to use the python build created with kivy? 

This should work.
Note that if you plan to use PyGame, it probably makes more sense to just use 
Kivy. 

Original comment by anthony....@gmail.com on 18 Jan 2013 at 9:46

GoogleCodeExporter commented 8 years ago
I'm actually trying to work with the twisted library. Where in python extras do 
you add the module? 

And once the module is added in the appropriate location am I correct in my 
understanding that you should be able to import that module directly into your 
.py file without appending any additional directories to the python search path?

Original comment by megan6...@gmail.com on 18 Jan 2013 at 10:44