Simplify third_party path in Python package (#20776)

* Simplify third_party path in Python package
* Fix typo
yaoxuefeng
qingqing01 6 years ago committed by GitHub
parent 16e4d02675
commit 728099d023
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -328,9 +328,14 @@ class InstallHeaders(Command):
else:
# third_party
install_dir = re.sub('${THIRD_PARTY_PATH}', 'third_party', header)
install_dir = re.sub('src/extern_eigen3/', '', install_dir)
install_dir = re.sub('src/extern_boost/', '', install_dir)
install_dir = re.sub('src/extern_dlpack/', '', install_dir)
patterns = ['eigen3/src/extern_eigen3', 'boost/src/extern_boost',
'dlpack/src/extern_dlpack/include',
'install/protobuf/include',
'install/gflags/include',
'install/glog/include', 'install/xxhash/include',
'threadpool/src/extern_threadpool']
for pattern in patterns:
install_dir = re.sub(pattern, '', install_dir)
install_dir = os.path.join(self.install_dir, os.path.dirname(install_dir))
if not os.path.exists(install_dir):
self.mkpath(install_dir)

Loading…
Cancel
Save