Make git dependency visible and enforce it.

resolves #87
This commit is contained in:
samuelkcrow 2021-10-04 14:43:14 -07:00
parent 39ae1270d7
commit dfbf0ba6e1
3 changed files with 10 additions and 1 deletions

View File

@ -32,6 +32,7 @@ The OpenRAM compiler has very few dependencies:
+ [Ngspice] 26 (or later) or HSpice I-2013.12-1 (or later) or CustomSim 2017 (or later) or [Xyce] 7.2 (or later)
+ Python 3.5 or higher
+ Various Python packages (pip install -r requirements.txt)
+ [Git]
If you want to perform DRC and LVS, you will need either:
+ Calibre (for [FreePDK45])
@ -215,6 +216,7 @@ If I forgot to add you, please let me know!
[Qflow]: http://opencircuitdesign.com/qflow/history.html
[Ngspice]: http://ngspice.sourceforge.net/
[Xyce]: http://xyce.sandia.gov/
[Git]: https://git-scm.com/
[OSUPDK]: https://vlsiarch.ecen.okstate.edu/flow/
[FreePDK45]: https://www.eda.ncsu.edu/wiki/FreePDK45:Contents

View File

@ -762,7 +762,7 @@ class lib:
else:
with open(os.devnull, 'wb') as devnull:
# parses the mose recent git commit id - requres git is installed
# parses the most recent git commit id - reason for global git dependancy
proc = subprocess.Popen(['git','rev-parse','HEAD'], cwd=os.path.abspath(os.environ.get("OPENRAM_HOME")) + '/', stdout=subprocess.PIPE)
git_id = str(proc.stdout.read())

View File

@ -159,6 +159,13 @@ def check_versions():
if not (major_python_version == major_required and minor_python_version >= minor_required):
debug.error("Python {0}.{1} or greater is required.".format(major_required, minor_required), -1)
# Verify any version of git is isntalled before proceeding
try:
subprocess.check_output(["git", "--version"])
except:
debug.error("Git is required. Please install git.")
sys.exit(1)
# FIXME: Check versions of other tools here??
# or, this could be done in each module (e.g. verify, characterizer, etc.)
global OPTS