Remove sha1sum dependency for doc generation

On MacOS X there is no sha1sum. So to simplify doc generation on those systems
use a Python script instead to generate a unique string from the repository
path.
This commit is contained in:
Richard Berger 2016-08-26 00:01:34 -04:00
parent e27196e91c
commit ea368919f3
2 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,5 @@
# Makefile for LAMMPS documentation
SHA1 = $(shell echo $USER-$PWD | sha1sum | cut -f1 -d" ")
SHA1 = $(shell echo $USER-$PWD | python utils/sha1sum.py)
BUILDDIR = /tmp/lammps-docs-$(SHA1)
RSTDIR = $(BUILDDIR)/rst
VENV = $(BUILDDIR)/docenv

7
doc/utils/sha1sum.py Executable file
View File

@ -0,0 +1,7 @@
#!/bin/env python
# simple utility which reimplements sha1sum using Python
import hashlib
import sys
s = hashlib.sha1()
s.update(sys.stdin.read().encode())
print(s.hexdigest())