From e2eaf97a9088558158914bdf3397f4f8e620aee7 Mon Sep 17 00:00:00 2001 From: Daniel Nordio <15243341+ttm56p@users.noreply.github.com> Date: Wed, 27 Nov 2024 02:24:32 +0200 Subject: [PATCH] Fix incorrect RECORD Fix _build_wheel producing wheels with incorrect RECORD file --- setup.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index b4212cb9d..f3e9690f2 100644 --- a/setup.py +++ b/setup.py @@ -165,13 +165,12 @@ def _build_wheel( for whlfile in glob.glob(os.path.join(self.dist_dir, "*.whl")): os.makedirs("wheelhouse", exist_ok=True) if InWheel: - with InWheel( - in_wheel=whlfile, - out_wheel=os.path.join("wheelhouse", os.path.basename(whlfile)), - ): + wheelhouse_whl = os.path.join("wheelhouse", os.path.basename(whlfile)) + shutil.move(whlfile, wheelhouse_whl) + with InWheel(in_wheel=wheelhouse_whl, out_wheel=whlfile): print(f"Updating RECORD file of {whlfile}") print("Copying new wheels") - shutil.move("wheelhouse", self.dist_dir) + shutil.rmtree("wheelhouse") def _download_and_extract_local_driver( self,