aboutsummaryrefslogtreecommitdiff
path: root/support/scripts/graph-build-time
diff options
context:
space:
mode:
Diffstat (limited to 'support/scripts/graph-build-time')
-rwxr-xr-xsupport/scripts/graph-build-time11
1 files changed, 8 insertions, 3 deletions
diff --git a/support/scripts/graph-build-time b/support/scripts/graph-build-time
index 433cd41d73..7eb3e47953 100755
--- a/support/scripts/graph-build-time
+++ b/support/scripts/graph-build-time
@@ -49,8 +49,14 @@
# * argparse (by default in Python 2.7, requires python-argparse if
# Python 2.6 is used)
-import matplotlib as mpl
-import numpy
+import sys
+
+try:
+ import matplotlib as mpl
+ import numpy
+except ImportError:
+ sys.stderr.write("You need python-matplotlib and python-numpy to generate build graphs\n")
+ exit(1)
# Use the Agg backend (which produces a PNG output, see
# http://matplotlib.org/faq/usage_faq.html#what-is-a-backend),
@@ -62,7 +68,6 @@ import matplotlib.pyplot as plt
import matplotlib.font_manager as fm
import csv
import argparse
-import sys
steps = [ 'extract', 'patch', 'configure', 'build',
'install-target', 'install-staging', 'install-images',