Get matplotlib working with upstream Python
This patch adds support for using matplotlib plus its Gtk backend with
`--config=k8_upstream_python`. Unfortunately, the Tk backend doesn't
work because of how Python is packaged. See the following issue for
more information:
https://github.com/matplotlib/matplotlib/issues/23074
Separately, we need to patch pygobject and matplotlib for various
hermeticity reasons. To accomplish this, I've added patching support
for wheels downloaded via rules_python. I should have set it up to use
annotations (the same mechanism we use for injecting deps), but it was
a little cumbersome. Annotations are not set up for using in arguments
to repository rules. I instead opted for a separate JSON file. You can
find it at `tools/python/patches.json`.
You can try the two new example programs:
$ bazel run --config=k8_upstream_python //build_tests:matplotlib_example
$ bazel run --config=k8_upstream_python //build_tests:pygobject_example
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I3c4e8648a8012aa23dedd53610e82d590d1c409d
diff --git a/debian/gtk_runtime.bzl b/debian/gtk_runtime.bzl
index 029419c..d8185f6 100644
--- a/debian/gtk_runtime.bzl
+++ b/debian/gtk_runtime.bzl
@@ -164,6 +164,8 @@
"libpsl5_0.21.0-1.2_amd64.deb": "d716f5b4346ec85bb728f4530abeb1da4a79f696c72d7f774c59ba127c202fa7",
"libpthread-stubs0-dev_0.4-1_amd64.deb": "54632f160e1e8a43656a87195a547391038c4ca0f53291b849cd4457ba5dfde9",
"librest-0.7-0_0.8.1-1.1_amd64.deb": "5cd57a96145a362bf60428315ab3fc6c2f528ab38a06a905da2568575c23bdc8",
+ "librsvg2-2_2.50.3+dfsg-1_amd64.deb": "c5f6cdb66683d9b8cd23f0e02e6adb29d43bdca301872842fa98d44e23fa1091",
+ "librsvg2-common_2.50.3+dfsg-1_amd64.deb": "4c28fad9d68e82729388f0b113de3a6ad020856c0783a3eced7eb626e80fcae6",
"libselinux1-dev_3.1-3_amd64.deb": "16b14d7e8ed88b9b07d1b52d84d04ab2fcdfcdc4b8cecc9dd34df06f3ce7d3fb",
"libselinux1_3.1-3_amd64.deb": "339f5ede10500c16dd7192d73169c31c4b27ab12130347275f23044ec8c7d897",
"libsensors-config_3.6.0-7_all.deb": "4265811140a591d27c99d026b63707d8235d98c73d7543c66ab9ec73c28523fc",