manual: Build system compatible with python3

This commit is contained in:
Stephen Sherratt
2017-05-23 16:26:15 +10:00
parent bc38085995
commit b2c84ed806
2 changed files with 6 additions and 0 deletions

View File

@@ -25,6 +25,11 @@ output_filename = sys.argv[1]
p = subprocess.Popen(["git", "log", "-r", "HEAD", "-n", "1", "--pretty=format:%ci"],
stdout=subprocess.PIPE)
commit_date_string = p.communicate()[0]
# in python3, this is a bytes, so convert it to a str
if isinstance(commit_date_string, bytes):
commit_date_string = commit_date_string.decode("utf-8")
commit_date = datetime.datetime.strptime(commit_date_string.split()[0], "%Y-%m-%d")
# Output in a format that LaTeX can read.

View File

@@ -15,6 +15,7 @@ import os
import sys
import argparse
import operator
from functools import reduce
from libsel4_tools import syscall_stub_gen
# Word size is required by the syscall_stub_gen library, but won't affect the output