TensorFlow: let install take care of the headers (#15718)

* TensorFlow: let install take care of the headers

we don't need to manually install them.

* no longer need to import glob
This commit is contained in:
Andrew W Elble 2020-03-27 22:35:13 -04:00 committed by GitHub
parent 829bfb5788
commit aed516ad56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,6 @@
# #
# SPDX-License-Identifier: (Apache-2.0 OR MIT) # SPDX-License-Identifier: (Apache-2.0 OR MIT)
from glob import glob
import sys import sys
@ -699,14 +698,6 @@ def install(self, spec, prefix):
setup_py('install', '--prefix={0}'.format(prefix), setup_py('install', '--prefix={0}'.format(prefix),
'--single-version-externally-managed', '--root=/') '--single-version-externally-managed', '--root=/')
site_packages_dir = join_path(
prefix.lib,
('python' + str(self.spec['python'].version.up_to(2))),
'site-packages')
fn = glob(join_path(site_packages_dir, "tensorflow-*"))
incpath = join_path(fn[0], "tensorflow/include")
setup_py('install_headers', '--install-dir={0}'.format(incpath))
@run_after('install') @run_after('install')
@on_package_attributes(run_tests=True) @on_package_attributes(run_tests=True)
def import_module_test(self): def import_module_test(self):