From 16c2767e0fabdddafda9fc18fc615bb908e01dc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= Date: Sat, 29 Jun 2024 14:47:42 +0200 Subject: [PATCH] ENH: implement GPGI_PY_LIB cleanup on Windows --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e0946c91..52a44a70 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ import os +import sys from distutils.extension import Extension from pathlib import Path @@ -15,7 +16,8 @@ "from the development version in editable mode." ) ext_modules = [] - for sofile in SRC_DIR.glob("*.so"): + pattern = "*.pyd" if sys.platform.startswith("win") else "*.so" + for sofile in SRC_DIR.glob(pattern): os.remove(sofile) else: ext_modules = cythonize(