Include absl headers in pip package
PiperOrigin-RevId: 212067303
This commit is contained in:
parent
04a0ae4b20
commit
3ea43a044e
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user