66
77class Python3Recipe (GuestPythonRecipe ):
88 '''
9- The python3's recipe.
9+ The python3's recipe
10+ ^^^^^^^^^^^^^^^^^^^^
1011
11- .. note:: This recipe can be built only against API 21+. Also, in order to
12- build certain python modules, we need to add some extra recipes to our
13- build requirements:
12+ The python 3 recipe can be built with some extra python modules, but to do
13+ so, we need some libraries. By default, we ship the python3 recipe with
14+ some common libraries, defined in ``depends``. We also support some optional
15+ libraries, which are less common that the ones defined in ``depends``, so
16+ we added them as optional dependencies (``opt_depends``).
1417
15- - ctypes: you must add the recipe for ``libffi``.
18+ Below you have a relationship between the python modules and the recipe
19+ libraries::
1620
21+ - _ctypes: you must add the recipe for ``libffi``.
22+ - _sqlite3: you must add the recipe for ``sqlite3``.
23+ - _ssl: you must add the recipe for ``openssl``.
24+ - _bz2: you must add the recipe for ``libbz2`` (optional).
25+ - _lzma: you must add the recipe for ``liblzma`` (optional).
26+
27+ .. note:: This recipe can be built only against API 21+.
28+
29+ .. versionchanged:: 2019.10.06.post0
30+ Added optional dependencies: :mod:`~pythonforandroid.recipes.libbz2`
31+ and :mod:`~pythonforandroid.recipes.liblzma`
1732 .. versionchanged:: 0.6.0
1833 Refactored into class
1934 :class:`~pythonforandroid.python.GuestPythonRecipe`
@@ -39,6 +54,10 @@ class Python3Recipe(GuestPythonRecipe):
3954 ]
4055
4156 depends = ['hostpython3' , 'sqlite3' , 'openssl' , 'libffi' ]
57+ # those optional depends allow us to build python compression modules:
58+ # - _bz2.so
59+ # - _lzma.so
60+ opt_depends = ['libbz2' , 'liblzma' ]
4261 conflicts = ['python2' ]
4362
4463 configure_args = (
0 commit comments