mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
look for python 3.9 on path
Doc updates to come
This commit is contained in:
parent
78125aa974
commit
339a353f3d
1 changed files with 8 additions and 4 deletions
12
python.bzl
12
python.bzl
|
@ -1,10 +1,14 @@
|
|||
def _impl(rctx):
|
||||
# locate python on path, and export it
|
||||
path = rctx.which("python3.8")
|
||||
names = ["python3.9", "python3.8", "python3", "python.exe"]
|
||||
path = None
|
||||
for name in names:
|
||||
path = rctx.which(name)
|
||||
if path:
|
||||
break
|
||||
|
||||
if not path:
|
||||
path = rctx.which("python.exe")
|
||||
if not path:
|
||||
fail("python3.8 or python.exe not found on path")
|
||||
fail("python3 or python.exe not found on path")
|
||||
|
||||
rctx.symlink(path, "python")
|
||||
rctx.file("BUILD.bazel", """
|
||||
|
|
Loading…
Reference in a new issue