diff --git a/setup.py b/setup.py index 8d2e2669852ea..2bef65c9719dc 100755 --- a/setup.py +++ b/setup.py @@ -293,6 +293,11 @@ def initialize_options(self): if d == '__pycache__': self._clean_trees.append(pjoin(root, d)) + # clean the generated pxi files + for pxifile in _pxifiles: + pxifile = pxifile.replace(".pxi.in", ".pxi") + self._clean_me.append(pxifile) + for d in ('build', 'dist'): if os.path.exists(d): self._clean_trees.append(d)