--- Python-3.8.0a3-orig/Python/dynload_shlib.c	2019-03-25 15:36:40.000000000 -0400
+++ Python-3.8.0a3/Python/dynload_shlib.c	2019-03-29 13:18:23.024414000 -0400
@@ -35,6 +35,8 @@
 
 const char *_PyImport_DynLoadFiletab[] = {
 #ifdef __CYGWIN__
+    "." SOABI ".dll",
+    ".abi" PYTHON_ABI_STRING ".dll",
     ".dll",
 #else  /* !__CYGWIN__ */
     "." SOABI ".so",
--- Python-3.12.4/configure.ac.orig	2024-06-06 20:26:44.000000000 +0200
+++ Python-3.12.4/configure.ac	2024-07-06 12:06:46.609582400 +0200
@@ -1080,6 +1080,14 @@
         darwin
 #elif defined(__VXWORKS__)
         vxworks
+#elif defined(__CYGWIN__)
+# if defined(__x86_64__)
+        x86_64-cygwin
+# elif defined(__i386__)
+        i386-cygwin
+# else
+#   error unknown platform triplet
+# endif
 #elif defined(__wasm32__)
 #  if defined(__EMSCRIPTEN__)
 	wasm32-emscripten
