Skip to content

Commit 5ad8ad7

Browse files
committed
[crystax] Improve docs and inline comments
By shortening a little some long texts, thanks @Jonast and @inclement!!
1 parent 185936e commit 5ad8ad7

File tree

2 files changed

+18
-31
lines changed

2 files changed

+18
-31
lines changed

doc/source/buildoptions.rst

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,12 @@ e.g. ``--requirements=python3``.
3535
CrystaX python3
3636
~~~~~~~~~~~~~~~
3737

38-
python-for-android originally supported Python 3 using the CrystaX NDK. Since
39-
we have a working python3 recipe, we don't support CrystaX NDK anymore. If you
40-
were using `python3crystax`, we recommend to give it a try to the new `python3`
41-
recipe.
42-
43-
.. note:: Since we don't support `python3crystax` anymore, the old instructions
44-
has been removed from here. If you, still have the need to make use
45-
of this old recipe, you should do it with an old `python-for-android`
46-
release. Probably, a good starting point would be `version 0.7.0
47-
<https://github.com/kivy/python-for-android/archive/0.7.0.zip>`__ or
48-
if that doesn't work , then go for `version 0.6.0
49-
<https://github.com/kivy/python-for-android/archive/0.6.0.zip>`__
38+
python-for-android no longer supports building for Python 3 using the CrystaX
39+
NDK. Instead, use the python3 recipe, which can be built using the normal
40+
Google NDK.
41+
42+
.. note:: The last python-for-android version supporting CrystaX was `0.7.0.
43+
<https://github.com/kivy/python-for-android/archive/0.7.0.zip>`__
5044

5145
.. _bootstrap_build_options:
5246

pythonforandroid/recipe.py

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -729,20 +729,14 @@ class PythonRecipe(Recipe):
729729

730730
depends = [('python2', 'python3')]
731731
'''
732-
.. note:: it's important to keep this depends as a class attribute, outside
733-
`__init__` because, sometimes, we only initialize the object, so
734-
the `__init__` call it won't be called, which will lead to not
735-
have the python versions as a dependencies and it will cause a
736-
tremendous `test_graph` error (difficult to track) and also, the
737-
build order for dependencies will not be computed as expected (if
738-
computed...). So be very careful with this line!!
739-
740-
.. warning:: this `depends` may be overwrote in inherited classes of
741-
`PythonRecipe`, so we make sure that any sub class will
742-
contain python as a dependency. We do this by checking the
743-
dependencies in meth:`PythonRecipe.__init__` method and adding
744-
them again in case that is necessary, so don't forget to call
745-
`super` in any inherited class of this class.
732+
.. note:: it's important to keep this depends as a class attribute outside
733+
`__init__` because sometimes we only initialize the class, so the
734+
`__init__` call won't be called and the deps would be missing
735+
(which breaks the dependency graph computation)
736+
737+
.. warning:: don't forget to call `super().__init__()` in any recipe's
738+
`__init__`, or otherwise it may not be ensured that it depends
739+
on python2 or python3 which can break the dependency graph
746740
'''
747741

748742
def __init__(self, *args, **kwargs):
@@ -754,11 +748,10 @@ def __init__(self, *args, **kwargs):
754748
if d in self.depends
755749
]
756750
):
757-
# we overwrote `depends` in inherited recipe, so we must add it
758-
# again the python versions as dependencies, but we only do this in
759-
# case that the sub classes recipe does not contain any python
760-
# version as dependency because it may be some recipes only
761-
# compatible with a single version of python
751+
# We ensure here that the recipe depends on python even it overrode
752+
# `depends`. We only do this if it doesn't already depend on any
753+
# python, since some recipes intentionally don't depend on/work
754+
# with all python variants
762755
depends = self.depends
763756
depends.append(('python2', 'python3'))
764757
depends = list(set(depends))

0 commit comments

Comments
 (0)