aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/platform
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-04-04 16:10:08 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-04-04 17:24:57 -0700
commitccbc8991db3943ef984405881a1c917c530f902f (patch)
treea7b5c760155bfa4ff95ffc0ebd3823c649668997 /tensorflow/python/platform
parent9477900946f923cb43ed76ed215490d01474bfe7 (diff)
Merge changes from github.
Change: 152200430
Diffstat (limited to 'tensorflow/python/platform')
-rw-r--r--tensorflow/python/platform/control_imports.py27
-rw-r--r--tensorflow/python/platform/googletest.py2
2 files changed, 28 insertions, 1 deletions
diff --git a/tensorflow/python/platform/control_imports.py b/tensorflow/python/platform/control_imports.py
new file mode 100644
index 0000000000..b8e8e78ef3
--- /dev/null
+++ b/tensorflow/python/platform/control_imports.py
@@ -0,0 +1,27 @@
+# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==============================================================================
+"""Switch between Google or open source dependencies."""
+# Switch between Google and OSS dependencies
+USE_OSS = True
+
+# Per-dependency switches determining whether each dependency is ready
+# to be replaced by its OSS equivalence.
+# TODO(danmane,mrry,opensource): Flip these switches, then remove them
+OSS_APP = True
+OSS_FLAGS = True
+OSS_GFILE = True
+OSS_GOOGLETEST = True
+OSS_LOGGING = True
+OSS_PARAMETERIZED = True
diff --git a/tensorflow/python/platform/googletest.py b/tensorflow/python/platform/googletest.py
index 5227d2e35c..1e74b1512b 100644
--- a/tensorflow/python/platform/googletest.py
+++ b/tensorflow/python/platform/googletest.py
@@ -99,6 +99,7 @@ def main(argv=None): # pylint: disable=function-redefined
def GetTempDir():
"""Return a temporary directory for tests to use."""
+ global _googletest_temp_dir
if not _googletest_temp_dir:
first_frame = inspect.stack()[-1][0]
temp_dir = os.path.join(
@@ -112,7 +113,6 @@ def GetTempDir():
logging.error('Error removing %s: %s', dirname, e)
atexit.register(delete_temp_dir)
- global _googletest_temp_dir
_googletest_temp_dir = temp_dir
return _googletest_temp_dir