diff options
author | 2018-08-06 16:32:37 -0700 | |
---|---|---|
committer | 2018-08-06 16:36:28 -0700 | |
commit | ba419f419613e0b1de03e123ecb43ad0df838683 (patch) | |
tree | 3fccd364a0bd280ad83e2584544b51c19715e9a2 /tensorflow/contrib/cmake | |
parent | 6ee02aafc8aab5c138e407e74ac423f41836ef1c (diff) |
Add a way to generate compat.v* modules in create_python_api.py. We
need to generate V2 and V1 in one step since V2's "compat" module (e.g.
"tf.compat.as_bytes") overlaps with "compat.v1". That is, some of the __init__.py files
are *shared*. So, we need to run create_python_api.py just once to generate all.
A few additional changes:
- Split out a few functions to prevent them from growing too large.
- Added output_init_files_test.py to test consistency of api_init_files.bzl and
api_init_files_v1.bzl. Before, this check was done in create_python_api.py
but now that we have different files for V1 and V2 this is getting
cumbersome, so I split it in a separete test.
PiperOrigin-RevId: 207629449
Diffstat (limited to 'tensorflow/contrib/cmake')
-rwxr-xr-x | tensorflow/contrib/cmake/tf_python.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/contrib/cmake/tf_python.cmake b/tensorflow/contrib/cmake/tf_python.cmake index 32b185f07b..5cb0db6b01 100755 --- a/tensorflow/contrib/cmake/tf_python.cmake +++ b/tensorflow/contrib/cmake/tf_python.cmake @@ -737,7 +737,7 @@ endif() ######################################################## # Parse tensorflow/python/tools/api/generator/BUILD to get list of generated files. -FILE(READ ${tensorflow_source_dir}/tensorflow/python/tools/api/generator/api_gen.bzl api_generator_BUILD_text) +FILE(READ ${tensorflow_source_dir}/tensorflow/python/tools/api/generator/api_init_files.bzl api_generator_BUILD_text) STRING(REGEX MATCH "# BEGIN GENERATED FILES.*# END GENERATED FILES" api_init_files_text ${api_generator_BUILD_text}) string(REPLACE "# BEGIN GENERATED FILES" "" api_init_files_text ${api_init_files_text}) string(REPLACE "# END GENERATED FILES" "" api_init_files_text ${api_init_files_text}) |