diff --git a/python/Makefile.am b/python/Makefile.am
index 4ab8ed959947d75494dd24bf872b87ab172b975d_cHl0aG9uL01ha2VmaWxlLmFt..9a19babe443aec91178acab883a291e6e2f2fa82_cHl0aG9uL01ha2VmaWxlLmFt 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -57,4 +57,7 @@
 tests test: all
 	cd tests && $(MAKE) tests
 
-CLEANFILES = $(GENERATED) *.o libxslt.so *.pyc libxslt.py gen_prog
+CLEANFILES = $(GENERATED) *.pyc libxslt.py gen_prog
+
+clean-local:
+	rm -rf __pycache__