litex_setup: revert default install behaviour but add --user support

This commit is contained in:
Florent Kermarrec 2019-04-23 14:53:00 +02:00
parent 9fbbf928ed
commit 228f286747
1 changed files with 5 additions and 2 deletions

View File

@ -26,7 +26,7 @@ repos = OrderedDict(repos)
if len(sys.argv) < 2: if len(sys.argv) < 2:
print("Available commands:") print("Available commands:")
print("- init") print("- init")
print("- install") print("- install (add --user to install to user directory)")
print("- update") print("- update")
exit() exit()
@ -46,7 +46,10 @@ if "install" in sys.argv[1:]:
print("[installing " + name + "]...") print("[installing " + name + "]...")
if need_develop: if need_develop:
os.chdir(os.path.join(current_path, name)) os.chdir(os.path.join(current_path, name))
os.system("python3 setup.py develop --user") if "--user" in sys.argv[1:]:
os.system("python3 setup.py develop --user")
else:
os.system("python3 setup.py develop")
if "update" in sys.argv[1:]: if "update" in sys.argv[1:]:
for name in repos.keys(): for name in repos.keys():