raulcd commented on code in PR #45425: URL: https://github.com/apache/arrow/pull/45425#discussion_r1942521253
########## ci/scripts/python_wheel_windows_test.bat: ########## @@ -58,11 +58,14 @@ py -0p @REM Validate wheel contents %PYTHON_CMD% C:\arrow\ci\scripts\python_wheel_validate_contents.py --path C:\arrow\python\repaired_wheels || exit /B 1 -@rem Download IANA Timezone Database for ORC C++ -curl https://cygwin.osuosl.org/noarch/release/tzdata/tzdata-2024a-1.tar.xz --output tzdata.tar.xz || exit /B -mkdir %USERPROFILE%\Downloads\test\tzdata -arc unarchive tzdata.tar.xz %USERPROFILE%\Downloads\test\tzdata || exit /B -set TZDIR=%USERPROFILE%\Downloads\test\tzdata\usr\share\zoneinfo +@rem Install tzdata python package and set TZDIR to tzdata database defined inside +%PYTHON_CMD% -m pip install tzdata || exit /B 1 +@echo off +setlocal EnableDelayedExpansion +set PYTHON_PROGRAM=!PYTHON_CMD! -c "import os; from importlib import resources; print(os.path.join(resources.files('tzdata'), 'zoneinfo'));" +for /f "delims=" %%i in ('!PYTHON_PROGRAM!') do set "TZDIR=%%i" +setlocal DisabledDelayedExpansion +@echo on Review Comment: @amoeba can we add more comments on the script? basically your comment on why `EnableDelayedExpansion/DisabledDelayedExpansion` are required and the `for /f`. I am struggling to understand what we are doing here now, I will struggle the next time we have to investigate it :) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org