Repository: kivy/python-for-android

Issue:
Update conditional build to python3
In https://github.com/kivy/python-for-android/pull/1471 we killed crystax for the CI which then means we need to port the conditional build script to `python3` see https://github.com/kivy/python-for-android/blob/3e561b0/ci/rebuild_updated_recipes.py#L12

Currently it fails with:
```
Traceback (most recent call last):
  File "./ci/rebuild_updated_recipes.py", line 99, in <module>
    main()
  File "./ci/rebuild_updated_recipes.py", line 95, in main
    build(target_python, recipes)
  File "./ci/rebuild_updated_recipes.py", line 59, in build
    crystax_ndk_home = os.environ['CRYSTAX_NDK_HOME']
  File "/home/user/venv/lib/python2.7/UserDict.py", line 40, in __getitem__
    raise KeyError(key)
KeyError: 'CRYSTAX_NDK_HOME'
```
e.g. https://api.travis-ci.org/v3/job/458635355/log.txt


Discussion:

Resolving patch:
diff --git a/ci/constants.py b/ci/constants.py
--- a/ci/constants.py
+++ b/ci/constants.py
@@ -4,6 +4,7 @@
 class TargetPython(Enum):
     python2 = 0
     python3crystax = 1
+    python3 = 2
 
 
 # recipes that currently break the build
@@ -94,9 +95,14 @@ class TargetPython(Enum):
     'storm',
     'vlc',
 ])
+# to be created via https://github.com/kivy/python-for-android/issues/1514
+BROKEN_RECIPES_PYTHON3 = set([
+])
+
 BROKEN_RECIPES = {
     TargetPython.python2: BROKEN_RECIPES_PYTHON2,
     TargetPython.python3crystax: BROKEN_RECIPES_PYTHON3_CRYSTAX,
+    TargetPython.python3: BROKEN_RECIPES_PYTHON3,
 }
 # recipes that were already built will be skipped
 CORE_RECIPES = set([
diff --git a/ci/rebuild_updated_recipes.py b/ci/rebuild_updated_recipes.py
--- a/ci/rebuild_updated_recipes.py
+++ b/ci/rebuild_updated_recipes.py
@@ -9,7 +9,6 @@
 ```
 ANDROID_SDK_HOME=~/.buildozer/android/platform/android-sdk-20
 ANDROID_NDK_HOME=~/.buildozer/android/platform/android-ndk-r9c
-CRYSTAX_NDK_HOME=~/.buildozer/crystax-ndk
 ./ci/rebuild_update_recipes.py
 ```
 
@@ -20,7 +19,7 @@
   [ERROR]:   Didn't find any valid dependency graphs.
   [ERROR]:   This means that some of your requirements pull in conflicting dependencies.
 - only rebuilds on sdl2 bootstrap
-- supports mainly python3crystax with fallback to python2, but no python3 support
+- supports mainly python3 with fallback to python2
 """
 import sh
 import os
@@ -56,9 +55,7 @@ def build(target_python, requirements):
     testapp = 'setup_testapp_python2.py'
     android_sdk_home = os.environ['ANDROID_SDK_HOME']
     android_ndk_home = os.environ['ANDROID_NDK_HOME']
-    crystax_ndk_home = os.environ['CRYSTAX_NDK_HOME']
-    if target_python == TargetPython.python3crystax:
-        android_ndk_home = crystax_ndk_home
+    if target_python == TargetPython.python3:
         testapp = 'setup_testapp_python3.py'
     requirements.add(target_python.name)
     requirements = ','.join(requirements)
@@ -75,7 +72,7 @@ def build(target_python, requirements):
 
 
 def main():
-    target_python = TargetPython.python3crystax
+    target_python = TargetPython.python3
     recipes = modified_recipes()
     print('recipes modified:', recipes)
     recipes -= CORE_RECIPES
diff --git a/pythonforandroid/recipes/jedi/__init__.py b/pythonforandroid/recipes/jedi/__init__.py
--- a/pythonforandroid/recipes/jedi/__init__.py
+++ b/pythonforandroid/recipes/jedi/__init__.py
@@ -1,13 +1,11 @@
-
 from pythonforandroid.recipe import PythonRecipe
 
 
 class JediRecipe(PythonRecipe):
-    # version = 'master'
     version = 'v0.9.0'
     url = 'https://github.com/davidhalter/jedi/archive/{version}.tar.gz'
 
-    depends = [('python2', 'python3crystax')]
+    depends = [('python2', 'python3crystax', 'python3')]
 
     patches = ['fix_MergedNamesDict_get.patch']
     # This apparently should be fixed in jedi 0.10 (not released to


Test patch: