From 235adb30c5d4ff3eecdd40495cdf7dacba7d11fc Mon Sep 17 00:00:00 2001
From: Drew Bollinger <drew@developmentseed.org>
Date: Mon, 15 Mar 2021 15:01:23 -0400
Subject: [PATCH] move directory creation inside the wheel context

---
 scripts/fix-wheel.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/fix-wheel.py b/scripts/fix-wheel.py
index 5c43f85e..df8f29e2 100644
--- a/scripts/fix-wheel.py
+++ b/scripts/fix-wheel.py
@@ -7,11 +7,11 @@ from delocate import wheeltools
 
 def add_library(paths):
     wheel_fnames = glob('/io/wheelhouse/pyopencl*.whl')
-    libs_dir = os.path.join('pyopencl', '.libs')
-    os.makedirs(libs_dir, exist_ok=True)
     for fname in wheel_fnames:
         print('Processing', fname)
         with wheeltools.InWheel(fname, fname):
+            libs_dir = os.path.join('pyopencl', '.libs')
+            os.makedirs(libs_dir, exist_ok=True)
             for lib_path in paths:
                 shutil.copy2(lib_path, libs_dir)
 
-- 
GitLab