litex_setup: detect and allow execution from a cloned LiteX repository.

Others dependencies will be installed alongside the Litex repository.
This commit is contained in:
Florent Kermarrec 2020-09-10 13:19:34 +02:00
parent b39fea4ecb
commit c169494793
1 changed files with 3 additions and 0 deletions

View File

@ -10,6 +10,9 @@ from collections import OrderedDict
import urllib.request
current_path = os.path.abspath(os.curdir)
# Check location (is litex_setup.py executed inside a cloned LiteX repository or alongside?)
if os.path.exists(".gitignore"):
current_path = os.path.join(current_path, "../")
# Repositories -------------------------------------------------------------------------------------