From 53dd73a538916cbfd96877c95dfd42eb6b92ed1c Mon Sep 17 00:00:00 2001 From: fo40225 Date: Wed, 11 Jul 2018 19:09:57 +0800 Subject: [PATCH] fix cmake python 2.7 test import fail --- tensorflow/__init__.py | 3 ++- tensorflow/contrib/cmake/python_modules.txt | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tensorflow/__init__.py b/tensorflow/__init__.py index 440e9f8dbd2..21677512b63 100644 --- a/tensorflow/__init__.py +++ b/tensorflow/__init__.py @@ -28,7 +28,8 @@ contrib = LazyLoader('contrib', globals(), 'tensorflow.contrib') del LazyLoader from tensorflow.python.platform import flags # pylint: disable=g-import-not-at-top -app.flags = flags # pylint: disable=undefined-variable +from tensorflow.python.platform import app # pylint: disable=g-import-not-at-top +app.flags = flags del absolute_import del division diff --git a/tensorflow/contrib/cmake/python_modules.txt b/tensorflow/contrib/cmake/python_modules.txt index 40041d9c885..a465cbf0f16 100644 --- a/tensorflow/contrib/cmake/python_modules.txt +++ b/tensorflow/contrib/cmake/python_modules.txt @@ -4,6 +4,8 @@ tensorflow tensorflow/core tensorflow/core/example tensorflow/core/framework +tensorflow/core/kernels +tensorflow/core/kernels/boosted_trees tensorflow/core/lib tensorflow/core/lib/core tensorflow/core/profiler