diff options
Diffstat (limited to 'tensorflow/tools/pip_package/setup.py')
-rw-r--r-- | tensorflow/tools/pip_package/setup.py | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/tensorflow/tools/pip_package/setup.py b/tensorflow/tools/pip_package/setup.py index 61419f25ae..3102239a19 100644 --- a/tensorflow/tools/pip_package/setup.py +++ b/tensorflow/tools/pip_package/setup.py @@ -167,17 +167,21 @@ class InstallHeaders(Command): # directories for -I install_dir = re.sub('/google/protobuf_archive/src', '', install_dir) - # Copy eigen code into tensorflow/include. + # Copy external code headers into tensorflow/include. # A symlink would do, but the wheel file that gets created ignores # symlink within the directory hierarchy. # NOTE(keveman): Figure out how to customize bdist_wheel package so # we can do the symlink. - if 'tensorflow/include/external/eigen_archive/' in install_dir: - extra_dir = install_dir.replace( - 'tensorflow/include/external/eigen_archive', '') - if not os.path.exists(extra_dir): - self.mkpath(extra_dir) - self.copy_file(header, extra_dir) + external_header_locations = [ + 'tensorflow/include/external/eigen_archive/', + 'tensorflow/include/external/com_google_absl/', + ] + for location in external_header_locations: + if location in install_dir: + extra_dir = install_dir.replace(location, '') + if not os.path.exists(extra_dir): + self.mkpath(extra_dir) + self.copy_file(header, extra_dir) if not os.path.exists(install_dir): self.mkpath(install_dir) @@ -227,6 +231,8 @@ headers = (list(find_files('*.h', 'tensorflow/core')) + list(find_files('*.h', 'tensorflow/stream_executor')) + list(find_files('*.h', 'google/protobuf_archive/src')) + list(find_files('*', 'third_party/eigen3')) + + list(find_files('*.h', + 'tensorflow/include/external/com_google_absl')) + list(find_files('*', 'tensorflow/include/external/eigen_archive'))) setup( |