fix recipes order with hostpython/python alias that didnt work in the first run
This commit is contained in:
parent
7c8a2c6c4b
commit
0e52dab468
3 changed files with 19 additions and 6 deletions
recipes
|
@ -7,9 +7,15 @@ class PythonAliasRecipe(Recipe):
|
|||
def init_after_import(self, ctx):
|
||||
python = ctx.state.get("python")
|
||||
if not python:
|
||||
print("WARNING: no python set yet, so you need to specify")
|
||||
print("WARNING: either python2 or python3 in your deps")
|
||||
else:
|
||||
# search in wanted_recipes if it's the first time
|
||||
if "python2" in ctx.wanted_recipes:
|
||||
python = "python2"
|
||||
elif "python3" in ctx.wanted_recipes:
|
||||
python = "python3"
|
||||
else:
|
||||
print("WARNING: no python set yet, so you need to specify")
|
||||
print("WARNING: either python2 or python3 in your deps")
|
||||
if python:
|
||||
self.depends = [python]
|
||||
|
||||
recipe = PythonAliasRecipe()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue