Make python things work in the sandbox
Everything seems to be plotting now, and graph_edit draws again.
Change-Id: I2aceb13577c0d7529e3169f89e2d0c71612f3a47
diff --git a/debian/matplotlib.BUILD b/debian/matplotlib.BUILD
index 208761a..5f89ba9 100644
--- a/debian/matplotlib.BUILD
+++ b/debian/matplotlib.BUILD
@@ -25,16 +25,18 @@
_data_files = glob([
"usr/share/matplotlib/mpl-data/**",
+ "usr/share/tcltk/**",
])
_src_copied = ["/".join(f.split("/")[4:]) for f in _src_files]
_builtin_so_files = glob([
"usr/lib/python2.7/dist-packages/**/*.x86_64-linux-gnu.so",
+ "usr/lib/python2.7/lib-dynload/*.so",
])
_system_so_files = glob([
- "usr/lib/x86_64-linux-gnu/**/*.so*",
+ "usr/lib/**/*.so*",
"lib/x86_64-linux-gnu/**/*.so*",
])
@@ -45,6 +47,7 @@
_builtin_rpaths = [":".join([
"\\$$ORIGIN/%s" % rel,
"\\$$ORIGIN/%s/rpathed/usr/lib/x86_64-linux-gnu" % rel,
+ "\\$$ORIGIN/%s/rpathed/usr/lib" % rel,
"\\$$ORIGIN/%s/rpathed/lib/x86_64-linux-gnu" % rel,
]) for rel in ["/".join([".." for _ in so.split("/")[1:]]) for so in _builtin_so_copied]]
@@ -96,9 +99,15 @@
)
genrule(
- name = "create_empty_rc",
+ name = "create_rc",
outs = ["usr/share/matplotlib/mpl-data/matplotlibrc"],
- cmd = "touch $@",
+ cmd = "\n".join([
+ "cat > $@ << END",
+ # This is necessary to make matplotlib actually plot things to the
+ # screen by default.
+ "backend : TkAgg",
+ "END",
+ ]),
)
py_library(