From bc087737a278508600cb1a150539b5f0a9f0abbd Mon Sep 17 00:00:00 2001 From: Ailing Date: Thu, 17 Nov 2022 22:35:38 +0800 Subject: [PATCH] [build] Restore installed c_api headers in the python wheel (#6647) Issue: # ### Brief Summary The filter discarded our installed headers by accident, this PR restore them so that nightly users can get both lib/ and include there. --- setup.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 7196db9694c8a..200f527862bb7 100644 --- a/setup.py +++ b/setup.py @@ -140,11 +140,12 @@ def get_cmake_args(): return cmake_args -def exclude_paths(manifest_files): +# Control files to be included in package data +def cmake_install_manifest_filter(manifest_files): return [ f for f in manifest_files - if f.endswith(('.so', 'pyd', - '.bc')) or os.path.basename(f) == 'libMoltenVK.dylib' + if f.endswith(('.so', 'pyd', '.bc', '.h', + '.hpp')) or os.path.basename(f) == 'libMoltenVK.dylib' ] @@ -174,7 +175,7 @@ def exclude_paths(manifest_files): }, classifiers=classifiers, cmake_args=get_cmake_args(), - cmake_process_manifest_hook=exclude_paths, + cmake_process_manifest_hook=cmake_install_manifest_filter, cmdclass={ 'egg_info': EggInfo, 'clean': Clean