Use defaults for environ.get()

Signed-off-by: Krzysztof Boronski <kboronski@antmicro.com>
This commit is contained in:
Krzysztof Boronski 2022-07-11 08:10:28 -05:00
parent 3e4a868071
commit cd168b1d1b
1 changed files with 5 additions and 5 deletions

View File

@ -75,11 +75,11 @@ install_dir = environ.get("F4PGA_INSTALL_DIR", "/usr/local")
mypath = str(Path(__file__).resolve().parent)
bin_dir_path = environ.get('F4PGA_BIN_DIR')
if bin_dir_path is None:
bin_dir_path = str(Path(sys_argv[0]).resolve().parent.parent)
share_dir_path = environ.get('F4PGA_SHARE_DIR')
bin_dir_path = \
environ.get('F4PGA_BIN_DIR', str(Path(sys_argv[0]).resolve().parent.parent))
share_dir_path = \
environ.get('F4PGA_SHARE_DIR',
str(Path(f'{install_dir}/xc7/install/share/symbiflow').resolve()))
if share_dir_path is None:
share_dir_path = str(Path(f'{install_dir}/xc7/install/share/symbiflow').resolve())