From 5bb3b0ee758dc6062089b8441010e08356c1005a Mon Sep 17 00:00:00 2001 From: Frost Ming Date: Wed, 27 Apr 2022 18:41:44 +0800 Subject: [PATCH] [build] [bug] Fix a bug of skbuild that loses the root package_dir (#4875) --- setup.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup.py b/setup.py index a776e2d18d26f..53752a499083f 100644 --- a/setup.py +++ b/setup.py @@ -64,6 +64,12 @@ def remove_tmp(taichi_dir): class EggInfo(egg_info): + def finalize_options(self, *args, **kwargs): + if '' not in self.distribution.package_dir: + # XXX: skbuild loses the root package dir + self.distribution.package_dir[''] = package_dir + return super().finalize_options(*args, **kwargs) + def run(self): taichi_dir = os.path.join(package_dir, 'taichi') remove_tmp(taichi_dir)