From da6e33cf60e4055dd2faae1b9d8c68cc204c9b9c Mon Sep 17 00:00:00 2001 From: qingqing01 Date: Thu, 31 Oct 2019 17:32:24 +0800 Subject: [PATCH] Simplify third_party path in Python package (#20776) (#20916) * Simplify third_party path in Python package * Fix typo --- python/setup.py.in | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/python/setup.py.in b/python/setup.py.in index 5dd44229230..6b0eecb21d4 100644 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -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) -- GitLab