8416d46fd4
* 🔥 Fix flake8 checks for host_setuptools3 * 🔥 Fix flake8 checks for kivy recipe * ✨ Fix flake8 for toolchain.py * 💡 Set python3 as the default python * Add .tox and ven to .gitignore * Update toolchain.py Co-Authored-By: Andre Miras <AndreMiras@users.noreply.github.com> Co-authored-by: Andre Miras <AndreMiras@users.noreply.github.com>
24 lines
614 B
Python
24 lines
614 B
Python
# -*- coding: utf-8 -*-
|
|
from toolchain import Recipe
|
|
import logging
|
|
from os.path import join
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
class PythonAliasRecipe(Recipe):
|
|
is_alias = True
|
|
|
|
def init_after_import(self, ctx):
|
|
python = ctx.state.get("python")
|
|
if not python:
|
|
# search in wanted_recipes if it's the first time
|
|
if "python2" in ctx.wanted_recipes:
|
|
python = "python2"
|
|
else:
|
|
python = "python3"
|
|
self.depends = [python]
|
|
self.recipe_dir = join(ctx.root_dir, "recipes", python)
|
|
|
|
|
|
recipe = PythonAliasRecipe()
|