in setup.py [0:0]
def run(self) -> None:
with open(_GITIGNORE, "r") as f:
ignores = f.readlines()
for wildcard in filter(None, ignores):
for filename in glob.glob(wildcard):
try:
os.remove(filename)
except OSError:
shutil.rmtree(filename, ignore_errors=True)
# It's an old-style class in Python 2.7...
distutils.command.clean.clean.run(self)