litex_setup: move requests import to avoid having to install it on travis.
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 20 May 2020 09:30:50 +0000 (11:30 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 20 May 2020 09:30:50 +0000 (11:30 +0200)
litex_setup.py

index 6438aa9b176a723895167d6d9c48471704609fee..cd0d43a012a6db98cc2b65c56ff9539ca1080396 100755 (executable)
@@ -7,7 +7,6 @@ import shutil
 import hashlib
 from collections import OrderedDict
 
-import requests
 import urllib.request
 
 current_path = os.path.abspath(os.curdir)
@@ -106,6 +105,7 @@ litex_setup_url = "https://raw.githubusercontent.com/enjoy-digital/litex/master/
 current_sha1 = hashlib.sha1(open(os.path.realpath(__file__)).read().encode("utf-8")).hexdigest()
 print("[checking litex_setup.py]...")
 try:
+    import requests
     r = requests.get(litex_setup_url)
     if r.status_code != 404:
         upstream_sha1 = hashlib.sha1(r.content).hexdigest()