Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ def maybe_bundle_libtpu(base_dir):

class Clean(distutils.command.clean.clean):

def bazel_clean_(self):
self.spawn(['bazel', 'clean', '--expunge'])

def run(self):
import glob
import re
Expand All @@ -180,6 +183,8 @@ def run(self):
except OSError:
shutil.rmtree(filename, ignore_errors=True)

self.execute(self.bazel_clean_, (), msg="Cleaning bazel outputs")

# It's an old-style class in Python 2.7...
distutils.command.clean.clean.run(self)

Expand Down