Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undocumented how to distribute egg libraries in self-contained APK #23

Open
GoogleCodeExporter opened this issue Apr 5, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

I have a working script which depends on a python .egg of PyBluez when run from 
a desktop or android console environment

I cannot establish and it seems undocumented how to package these dependencies 
to satisfy the needs of a self-contained Python APK. I assume I'm getting the 
packaging wrong, which may be why the deployment fails.

The script relies on the python-for-android Bluez .egg at 
https://code.google.com/p/python-for-android/downloads/detail?name=PyBluez-0.19-
py2.6-linux-armv.egg

Can it be recorded how this .egg should properly be distributed to fit in with 
the layout of the standard APK Eclipse .project for creating APK files which 
you have shared via https://code.google.com/p/android-python27/source/checkout

Original issue reported on code.google.com by c...@cefn.com on 18 Mar 2013 at 5:24

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

You cannot use PyBluez-0.19-py2.6-linux-armv.egg as it's linked against 
libpython2.6.so and this project uses Python 2.7 by default, you can use a 
Python 2.6 build from Py4a build, see: 
https://code.google.com/p/android-python27/wiki/TutorialHowToChangePythonBuilds

Or add your modules directly in the Python build process, or create your .egg 
for Python 2.7 (not documented yet)

Original comment by anthony....@gmail.com on 18 Mar 2013 at 6:26

@GoogleCodeExporter
Copy link
Author

OK, so I think you're saying I could either 

* work out how to drop the contents of the PyBlueZ .egg file into the 
python_extras_r14.zip from Py4A (Python 2.6), then bundle the 2.6 zips in the 
res/raw directory of the canonical APK, replacing the existing 2.7 ones and 
updating the relevant variables as per 
https://code.google.com/p/android-python27/wiki/TutorialHowToChangePythonBuilds,
 so that the .so which they're linked against is actually there.

* work out how to incorporate the PyBluez source from which the .egg was 
generated into the process at 
https://code.google.com/p/python-for-android/wiki/BuildingPython so that they 
are actually linked to the 2.7 .so in the first place.

Thanks for the response. I hope it's going to clear some serious obstacles for 
me.

Original comment by c...@cefn.com on 18 Mar 2013 at 8:23

@GoogleCodeExporter
Copy link
Author

Seems good scheme.

The Python build is different from PY4A, you can check the README here: 
https://code.google.com/p/android-python27/source/browse/#hg%2Fpython-build

Original comment by anthony....@gmail.com on 19 Mar 2013 at 9:21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant