From 02137805c715e4947362bd3e68920fcfd1356761 Mon Sep 17 00:00:00 2001 From: Ganesh Gore Date: Thu, 29 Aug 2019 22:13:18 -0600 Subject: [PATCH] Added python version check in flow and task scripts --- openfpga_flow/scripts/run_fpga_flow.py | 12 ++++++++++++ openfpga_flow/scripts/run_fpga_task.py | 13 +++++++++++++ 2 files changed, 25 insertions(+) diff --git a/openfpga_flow/scripts/run_fpga_flow.py b/openfpga_flow/scripts/run_fpga_flow.py index 69bbe1063..3a35830bd 100644 --- a/openfpga_flow/scripts/run_fpga_flow.py +++ b/openfpga_flow/scripts/run_fpga_flow.py @@ -1,3 +1,12 @@ +# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = +# Script Name : run_fpga_flow.py +# Description : This script designed to run different flows supported by +# OpensFPGA project. +# Args : python3 run_fpga_flow.py --help +# Author : Ganesh Gore +# Email : ganeshgore@utah.edu +# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = + import os import sys import shutil @@ -18,6 +27,9 @@ from importlib import util if util.find_spec("humanize"): import humanize +if sys.version_info[0] < 3: + raise Exception("run_fpga_task script must be using Python 3") + # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = # Initialise general paths for the script # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = diff --git a/openfpga_flow/scripts/run_fpga_task.py b/openfpga_flow/scripts/run_fpga_task.py index 00ee85ee9..f5b6ee9bd 100644 --- a/openfpga_flow/scripts/run_fpga_task.py +++ b/openfpga_flow/scripts/run_fpga_task.py @@ -1,3 +1,13 @@ +# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = +# Script Name : run_fpga_task.py +# Description : This script designed to run openfpga_flow tasks, +# Opensfpga task are design to run opefpga_flow on each +# Combination of architecture, benchmark and script paramters +# Args : python3 run_fpga_task.py --help +# Author : Ganesh Gore +#Email : ganeshgore@utah.edu +# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = + import os import sys import shutil @@ -19,6 +29,9 @@ from collections import OrderedDict if util.find_spec("humanize"): import humanize +if sys.version_info[0] < 3: + raise Exception("run_fpga_task script must be using Python 3") + # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = # Configure logging system # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =