f4pga/sfbuild: get INSTALL_DIR from environ

Signed-off-by: Unai Martinez-Corral <umartinezcorral@antmicro.com>
This commit is contained in:
Unai Martinez-Corral 2022-03-02 01:48:00 +01:00
parent 898eab8232
commit 72913daac2
1 changed files with 37 additions and 36 deletions

View File

@ -23,6 +23,7 @@ such as list of source code files.
from argparse import Namespace from argparse import Namespace
import os import os
from os import environ
import json import json
from typing import Iterable from typing import Iterable
from colorama import Fore, Style from colorama import Fore, Style
@ -45,7 +46,7 @@ mypath = os.path.realpath(os.sys.argv[0])
mypath = os.path.dirname(mypath) mypath = os.path.dirname(mypath)
binpath = os.path.realpath(os.path.join(mypath, '..')) binpath = os.path.realpath(os.path.join(mypath, '..'))
share_dir_path = os.path.realpath(os.path.join(mypath, '../../share/symbiflow')) share_dir_path = os.path.realpath(f"{environ.get('INSTALL_DIR', '/usr/local')}/xc7/install/share/symbiflow")
class DependencyNotProducedException(Exception): class DependencyNotProducedException(Exception):
dep_name: str dep_name: str