Merge pull request from fo40225:fix_win_py27

PiperOrigin-RevId: 228221424
This commit is contained in:
TensorFlower Gardener 2019-01-07 14:10:43 -08:00
commit d29506e655
3 changed files with 6 additions and 1 deletions

View File

@ -62,7 +62,8 @@ if '__all__' in vars():
vars()['__all__'].append('contrib')
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
# Make sure directory containing top level submodules is in
# the __path__ so that "from tensorflow.foo import bar" works.

View File

@ -1,6 +1,9 @@
# python_sanity_test.py will complain about invalid or missing entries
# problematic entries can be commented for temporary whitelisting
tensorflow
tensorflow/compiler
tensorflow/compiler/xla
tensorflow/compiler/xla/service
tensorflow/core
tensorflow/core/example
tensorflow/core/framework

View File

@ -802,6 +802,7 @@ add_custom_command(
# tensorflow/__init__.py depends on files generated in this step. So, remove it while
# this step is running since the files aren't there yet.
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_CURRENT_BINARY_DIR}/tf_python/tensorflow/__init__.py
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/tf_python/tensorflow/__init__.py
# Run create_python_api.py to generate API init files.
COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}/tf_python "${PY_RUNTIME_ENV}" ${PYTHON_EXECUTABLE}