diff --git a/.ci/scripts/wheel/pre_build_script.sh b/.ci/scripts/wheel/pre_build_script.sh index 3b83194241e..92dd431adc3 100755 --- a/.ci/scripts/wheel/pre_build_script.sh +++ b/.ci/scripts/wheel/pre_build_script.sh @@ -164,6 +164,20 @@ fi "${GITHUB_WORKSPACE}/${REPOSITORY}/install_requirements.sh" --example +if [[ $UNAME_S == *"MINGW"* || $UNAME_S == *"MSYS"* ]]; then + PYTHON_BIN=$(command -v python || command -v python3) + if "${PYTHON_BIN}" -c 'import sys; sys.exit(sys.version_info < (3, 15))'; then + # No cp315 tokenizer wheel is published. Build the pinned source with the + # existing build dependencies and Visual Studio environment before smoke install. + # MSBuild's file tracker needs a short path even during CMake compiler checks. + tokenizer_source_dir=$(mktemp -d /c/et-tok.XXXXXX) + cp -R extension/llm/tokenizers/. "${tokenizer_source_dir}" + cmd //c '.ci\scripts\wheel\vc_env_helper.bat' python -m pip install \ + --no-build-isolation "$(cygpath -w "${tokenizer_source_dir}")" + rm -rf "${tokenizer_source_dir}" + fi +fi + # Enable VGF in pybind wheel builds when the platform-specific build input is # available from pip. if [[ "$UNAME_S" == "Linux" || "$UNAME_S" == "Darwin" ]]; then