From 9308397ee5b1b6b8975d12b3e2983c9fe6b31416 Mon Sep 17 00:00:00 2001 From: anubhav Date: Tue, 21 Jan 2025 21:10:20 +0530 Subject: [PATCH 1/4] Updated delvewheel install command and updated flags used with delvewheel repair --- ci/scripts/python_wheel_windows_build.bat | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ci/scripts/python_wheel_windows_build.bat b/ci/scripts/python_wheel_windows_build.bat index 9287d2471deec..f93a6b4de2da8 100644 --- a/ci/scripts/python_wheel_windows_build.bat +++ b/ci/scripts/python_wheel_windows_build.bat @@ -144,16 +144,13 @@ cp C:\Windows\System32\msvcp140.dll pyarrow\ @REM Since we bundled the Arrow C++ libraries ourselves, we only need to @REM mangle msvcp140.dll so as to avoid ABI issues when msvcp140.dll is @REM required by multiple Python libraries in the same process. -@REM -@REM For now this requires a custom version of delvewheel: -@REM https://github.com/adang1345/delvewheel/pull/59 -%PYTHON_CMD% -m pip install https://github.com/pitrou/delvewheel/archive/refs/heads/fixes-for-arrow.zip || exit /B 1 +%PYTHON_CMD% -m pip install delvewheel || exit /B 1 for /f %%i in ('dir dist\pyarrow-*.whl /B') do (set WHEEL_NAME=%cd%\dist\%%i) || exit /B 1 echo "Wheel name: %WHEEL_NAME%" %PYTHON_CMD% -m delvewheel repair -vv ^ - --mangle-only=msvcp140.dll --no-patch ^ + --ignore-existing --with-mangle=msvcp140.dll ^ -w repaired_wheels %WHEEL_NAME% || exit /B 1 popd From d7c2e4817569c55fb613bb0dc359a005f70a46d1 Mon Sep 17 00:00:00 2001 From: anubhav Date: Tue, 21 Jan 2025 22:46:10 +0530 Subject: [PATCH 2/4] Removed arguments from --with-mangle flag --- ci/scripts/python_wheel_windows_build.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/scripts/python_wheel_windows_build.bat b/ci/scripts/python_wheel_windows_build.bat index f93a6b4de2da8..3764f2d53140f 100644 --- a/ci/scripts/python_wheel_windows_build.bat +++ b/ci/scripts/python_wheel_windows_build.bat @@ -150,7 +150,7 @@ for /f %%i in ('dir dist\pyarrow-*.whl /B') do (set WHEEL_NAME=%cd%\dist\%%i) || echo "Wheel name: %WHEEL_NAME%" %PYTHON_CMD% -m delvewheel repair -vv ^ - --ignore-existing --with-mangle=msvcp140.dll ^ + --ignore-existing --with-mangle ^ -w repaired_wheels %WHEEL_NAME% || exit /B 1 popd From 4135fb950b2d05b9e76a305ee09592f894e81a44 Mon Sep 17 00:00:00 2001 From: anubhav Date: Wed, 22 Jan 2025 00:15:28 +0530 Subject: [PATCH 3/4] Removed the line to copy msvcp40.dll to the wheel --- ci/scripts/python_wheel_windows_build.bat | 3 --- 1 file changed, 3 deletions(-) diff --git a/ci/scripts/python_wheel_windows_build.bat b/ci/scripts/python_wheel_windows_build.bat index 3764f2d53140f..988c0dde9a2ea 100644 --- a/ci/scripts/python_wheel_windows_build.bat +++ b/ci/scripts/python_wheel_windows_build.bat @@ -133,9 +133,6 @@ set CMAKE_PREFIX_PATH=C:\arrow-dist pushd C:\arrow\python -@REM Bundle the C++ runtime -cp C:\Windows\System32\msvcp140.dll pyarrow\ - @REM Build wheel %PYTHON_CMD% setup.py bdist_wheel || exit /B 1 From 657d9710794ed54ebf253777df81b578c7c81d85 Mon Sep 17 00:00:00 2001 From: anubhav Date: Wed, 22 Jan 2025 16:33:46 +0530 Subject: [PATCH 4/4] allow pyarrow.libs folder in windows wheel --- ci/scripts/python_wheel_validate_contents.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/scripts/python_wheel_validate_contents.py b/ci/scripts/python_wheel_validate_contents.py index 22b3a890f036b..84fcaba42e699 100644 --- a/ci/scripts/python_wheel_validate_contents.py +++ b/ci/scripts/python_wheel_validate_contents.py @@ -29,7 +29,7 @@ def validate_wheel(path): f = zipfile.ZipFile(wheels[0]) outliers = [ info.filename for info in f.filelist if not re.match( - r'(pyarrow/|pyarrow-[-.\w\d]+\.dist-info/)', info.filename + r'(pyarrow/|pyarrow-[-.\w\d]+\.dist-info/|pyarrow\.libs/)', info.filename ) ] assert not outliers, f"Unexpected contents in wheel: {sorted(outliers)}"