Remove __pycache__ directories correctly on OpenBSD

Closes #13326.
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 5c30eb3..896a08e 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1285,8 +1285,8 @@
 # Sanitation targets -- clean leaves libraries, executables and tags
 # files, which clobber removes as well
 pycremoval:
+	-find $(srcdir) -depth -name '__pycache__' -exec rm -rf {} ';'
 	-find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
-	-find $(srcdir) -name '__pycache__' -exec rmdir {} '+'
 
 rmtestturds:
 	-rm -f *BAD *GOOD *SKIPPED
diff --git a/Misc/NEWS b/Misc/NEWS
index 43cffba..47da819 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1445,6 +1445,8 @@
 Build
 -----
 
+- Issue #13326: Clean __pycache__ directories correctly on OpenBSD.
+
 - PEP 393: the configure option --with-wide-unicode is removed.
 
 - Issue #12852: Set _XOPEN_SOURCE to 700, instead of 600, to get POSIX 2008