mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
litex_setup: Declare python3 in top and use it.
This commit is contained in:
parent
f82f769794
commit
af26d939d0
1 changed files with 5 additions and 4 deletions
|
@ -12,6 +12,7 @@ import urllib.request
|
||||||
|
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
current_path = os.path.abspath(os.curdir)
|
current_path = os.path.abspath(os.curdir)
|
||||||
|
python3 = sys.executable
|
||||||
|
|
||||||
# Helpers ------------------------------------------------------------------------------------------
|
# Helpers ------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -156,7 +157,7 @@ def litex_setup_auto_update():
|
||||||
print_status("LiteX Setup is obsolete, updating.")
|
print_status("LiteX Setup is obsolete, updating.")
|
||||||
with open(os.path.realpath(__file__), "wb") as f:
|
with open(os.path.realpath(__file__), "wb") as f:
|
||||||
f.write(r.content)
|
f.write(r.content)
|
||||||
os.execl(sys.executable, sys.executable, *sys.argv)
|
os.execl(python3, python3, *sys.argv)
|
||||||
else:
|
else:
|
||||||
print_status("LiteX Setup is up to date.")
|
print_status("LiteX Setup is up to date.")
|
||||||
except:
|
except:
|
||||||
|
@ -221,9 +222,9 @@ def litex_setup_install_repos(config="standard", user_mode=False):
|
||||||
if repo.develop:
|
if repo.develop:
|
||||||
print_status(f"Installing {name} Git repository...")
|
print_status(f"Installing {name} Git repository...")
|
||||||
os.chdir(os.path.join(current_path, name))
|
os.chdir(os.path.join(current_path, name))
|
||||||
subprocess.check_call("{python_executable} setup.py develop {options}".format(
|
subprocess.check_call("{python3} setup.py develop {options}".format(
|
||||||
python_executable = sys.executable,
|
python3 = sys.executable,
|
||||||
options="--user" if user_mode else "",
|
options = "--user" if user_mode else "",
|
||||||
), shell=True)
|
), shell=True)
|
||||||
if user_mode:
|
if user_mode:
|
||||||
if ".local/bin" not in os.environ.get("PATH", ""):
|
if ".local/bin" not in os.environ.get("PATH", ""):
|
||||||
|
|
Loading…
Reference in a new issue