kivy / buildozer

Generic Python packager for Android and iOS
https://buildozer.readthedocs.io
MIT License
1.75k stars 503 forks source link

How does Buildozer handle libraries? #1835

Open mimmomarc opened 4 months ago

mimmomarc commented 4 months ago

Hi everyone, i'm new to using Buildozer. I think it's a very interesting and useful tool, it's fantastic!

I have a question, for exampe, i have a project that uses a set of libraries, so i install them with

pip install library1 library2 library3

In the buildozer.spec file, i list the libraries i'm using :

requirements=library1,library2,library3

When you build the project, for example for Android, what does Buildozer do? Does it make a copy of the installed libraries or does it generate new ones by retrieving and reinstalling them from a package source? Or something else ?

Thank you very much in advance

RobertFlatt commented 4 months ago

You can read the log file to see the answer, but you got it right:

it generate new ones by retrieving and reinstalling them from a package source.

This is because the packages have to be for the version of Python used on Android which may or may not be the same as the local Python version, and also some packages are not pure Python and require compilation for Android as Android wheels do not exist in the repositories (this is what recipes are about).

There is as far as I know no official 'how it works' documentation.

Just driving by, I'm an occasional visitor don't expect a response.