From 22d99c041e1a669bb8b4b4aaf3efddadc7b70cff Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Wed, 18 Apr 2018 19:55:49 -0700 Subject: [PATCH] Vendor bleach and html5lib in pip package TensorBoard uses bleach, which depends on html5lib, which made a big breaking change at some point in the past. Since upgrading these dependencies is not possible, we'll shade them under the `tensorboard._vendor` namespace, which is magically created by our build_pip_package script, which was rewritten, to support smoke testing and dash. The new process for building the TensorBoard pip package is: ```sh rm -rf /tmp/tensorboard bazel run //tensorboard/pip_package:build_pip_package pip install -U /tmp/tensorboard/*py2*.pip ``` Fixes tensorflow/tensorflow#16424 Fixes #427 Fixes #588 Closes #607 Could help #748 --- tensorboard/BUILD | 2 +- tensorboard/components/tf_imports/d3.html | 17 --- tensorboard/components/tf_imports/dagre.html | 17 --- .../components/tf_imports/graphlib.html | 27 ++-- tensorboard/components/tf_imports/lodash.html | 17 --- .../components/tf_imports/numericjs.html | 17 --- .../components/tf_imports/plottable.html | 17 --- .../components/tf_imports/threejs.html | 17 --- tensorboard/components/tf_imports/weblas.html | 17 --- tensorboard/pip_package/BUILD | 53 ++++++++ .../{LICENSE => LICENSE.tensorflow} | 0 tensorboard/pip_package/MANIFEST.in | 4 +- tensorboard/pip_package/build_pip_package.sh | 124 +++++++++++------- tensorboard/pip_package/setup.cfg | 4 +- tensorboard/pip_package/setup.py | 4 +- third_party/bleach.BUILD | 5 +- third_party/fonts.bzl | 8 ++ third_party/html5lib.BUILD | 45 ++++++- third_party/js.bzl | 5 + third_party/polymer.bzl | 1 + 20 files changed, 210 insertions(+), 191 deletions(-) rename tensorboard/pip_package/{LICENSE => LICENSE.tensorflow} (100%) diff --git a/tensorboard/BUILD b/tensorboard/BUILD index cc5e45282f..179a69c5f7 100644 --- a/tensorboard/BUILD +++ b/tensorboard/BUILD @@ -82,7 +82,7 @@ py_library( ], ) -py_binary( +py_library( name = "version", srcs = ["version.py"], srcs_version = "PY2AND3", diff --git a/tensorboard/components/tf_imports/d3.html b/tensorboard/components/tf_imports/d3.html index 76ca302709..02be0c20bb 100644 --- a/tensorboard/components/tf_imports/d3.html +++ b/tensorboard/components/tf_imports/d3.html @@ -1,20 +1,3 @@ - - - diff --git a/tensorboard/components/tf_imports/lodash.html b/tensorboard/components/tf_imports/lodash.html index 192e61cc99..33ab668a63 100644 --- a/tensorboard/components/tf_imports/lodash.html +++ b/tensorboard/components/tf_imports/lodash.html @@ -1,18 +1 @@ - - diff --git a/tensorboard/components/tf_imports/numericjs.html b/tensorboard/components/tf_imports/numericjs.html index 69e948eb99..b7656dd2a3 100644 --- a/tensorboard/components/tf_imports/numericjs.html +++ b/tensorboard/components/tf_imports/numericjs.html @@ -1,20 +1,3 @@ - - - - -