From c169494793d63afb789042a913b84477d794b6ef Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 10 Sep 2020 13:19:34 +0200 Subject: [PATCH] litex_setup: detect and allow execution from a cloned LiteX repository. Others dependencies will be installed alongside the Litex repository. --- litex_setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/litex_setup.py b/litex_setup.py index d1e9a6caf..c17957f08 100755 --- a/litex_setup.py +++ b/litex_setup.py @@ -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 -------------------------------------------------------------------------------------