From 2bb2ae2037b36fad54fd7fa194e27122afcceddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= Date: Tue, 14 Jun 2022 17:00:26 +0200 Subject: [PATCH] init: set share_dir_path according to FPGA_FAM env var MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Czarnecki --- f4pga/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/f4pga/__init__.py b/f4pga/__init__.py index 49eb36c..4bfeca3 100755 --- a/f4pga/__init__.py +++ b/f4pga/__init__.py @@ -74,14 +74,13 @@ install_dir = environ.get("F4PGA_INSTALL_DIR", "/usr/local") mypath = str(Path(__file__).resolve().parent) +FPGA_FAM = environ.get('FPGA_FAM', 'xc7') 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/f4pga').resolve())) -if share_dir_path is None: - share_dir_path = str(Path(f'{install_dir}/xc7/install/share/f4pga').resolve()) + str(Path(f'{install_dir}/{FPGA_FAM}/install/share/f4pga').resolve())) class DependencyNotProducedException(F4PGAException): dep_name: str