2018-11-02 11:44:25 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
2020-05-03 16:23:08 +02:00
|
|
|
from kivy_ios.toolchain import Recipe
|
2019-02-07 10:00:23 +01:00
|
|
|
import logging
|
2019-09-16 19:53:15 +02:00
|
|
|
from os.path import join
|
2019-02-07 10:00:23 +01:00
|
|
|
|
|
|
|
logger = logging.getLogger(__name__)
|
2018-11-02 11:44:25 +01:00
|
|
|
|
2020-04-25 18:28:16 +02:00
|
|
|
|
2018-11-02 11:44:25 +01:00
|
|
|
class PythonAliasRecipe(Recipe):
|
2020-05-05 23:17:44 +02:00
|
|
|
"""
|
|
|
|
Note this recipe was created to handle both python2 and python3.
|
|
|
|
As python2 support was dropped, this could probably be simplified.
|
|
|
|
"""
|
2018-11-02 11:44:25 +01:00
|
|
|
is_alias = True
|
|
|
|
|
|
|
|
def init_after_import(self, ctx):
|
|
|
|
python = ctx.state.get("python")
|
|
|
|
if not python:
|
2020-05-05 23:17:44 +02:00
|
|
|
python = "python3"
|
2020-04-27 07:29:11 +02:00
|
|
|
self.depends = [python]
|
2019-09-16 19:53:15 +02:00
|
|
|
self.recipe_dir = join(ctx.root_dir, "recipes", python)
|
2018-11-02 11:44:25 +01:00
|
|
|
|
2020-04-25 18:28:16 +02:00
|
|
|
|
2018-11-02 11:44:25 +01:00
|
|
|
recipe = PythonAliasRecipe()
|