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

How to build apk with a cython file #283

Closed
ailisp opened this issue Feb 4, 2016 · 2 comments
Closed

How to build apk with a cython file #283

ailisp opened this issue Feb 4, 2016 · 2 comments

Comments

@ailisp
Copy link

ailisp commented Feb 4, 2016

I have successfully built a apk only depends on kivy. However, after rewrite one of the py file to pyx, I can't generate a correct apk file. I tried add cython in requirements from buildozer.spec or add .so files to source.include_exts, but this seems useless. The project works on computers correctly after a simple setup.py (kivy 1.9.1, cython 0.23.4, python 2.7.9).

from distutils.core import setup
from Cython.Build import cythonize

setup(
    name='ai',
    ext_modules=cythonize("ai.pyx"),
)

How to make a apk with a pyx file? Thank you a lot.

@kived
Copy link
Contributor

kived commented Feb 4, 2016

You need to make a recipe for any compiled components. The "old" way would be to clone p4a itself, add your recipe, then point buildozer to your local p4a instead of letting it download one. The "new" way is to use the custom recipe support in p4a revamp/android_new target, but I don't know if that's supported via buildozer yet.

@ailisp
Copy link
Author

ailisp commented Feb 6, 2016

Thank you. I found you said in p4a doc and I'll try it.

@kived kived closed this as completed May 8, 2016
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

No branches or pull requests

2 participants