Skip to content

Commit

Permalink
apacheGH-33981: [Python][Packaging] Use delvewheel to repair Windows …
Browse files Browse the repository at this point in the history
…wheels
  • Loading branch information
raulcd committed Apr 25, 2023
1 parent 9009dd7 commit 408852a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions ci/scripts/python_wheel_windows_build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ set ARROW_HOME=C:\arrow-dist
set CMAKE_PREFIX_PATH=C:\arrow-dist

pushd C:\arrow\python
@REM bundle the msvc runtime
cp "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.16.27012\x64\Microsoft.VC141.CRT\msvcp140.dll" pyarrow\
@REM build wheel
python setup.py bdist_wheel || exit /B 1

@REM Repair the wheel with delvewheel
pip install delvewheel || exit /B 1
delvewheel show || exit /B 1
delvewheel repair -L . dist\pyarrow-*.whl -w repaired_wheels || exit /B 1
popd
2 changes: 1 addition & 1 deletion ci/scripts/python_wheel_windows_test.bat
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ set PARQUET_TEST_DATA=C:\arrow\submodules\parquet-testing\data
pip install -r C:\arrow\python\requirements-wheel-test.txt || exit /B 1

@REM Install the built wheels
python -m pip install --no-index --find-links=C:\arrow\python\dist\ pyarrow || exit /B 1
python -m pip install --no-index --find-links=C:\arrow\python\repaired_wheels pyarrow || exit /B 1

@REM Test that the modules are importable
python -c "import pyarrow" || exit /B 1
Expand Down
4 changes: 2 additions & 2 deletions dev/tasks/python-wheels/github.windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ jobs:
cd arrow
archery docker run python-wheel-windows-test
{{ macros.github_upload_releases("arrow/python/dist/*.whl")|indent }}
{{ macros.github_upload_gemfury("arrow/python/dist/*.whl")|indent }}
{{ macros.github_upload_releases("arrow/python/repaired_wheels/*.whl")|indent }}
{{ macros.github_upload_gemfury("arrow/python/repaired_wheels/*.whl")|indent }}

{% if arrow.is_default_branch() %}
- name: Push Docker Image
Expand Down

0 comments on commit 408852a

Please sign in to comment.