mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-08 17:57:44 +00:00
fix: keep CRLF when patching CPython on Windows
git apply inherits the caller's configuration, so under core.autocrlf=input it rewrites the patched PCbuild/find_python.bat to LF. cmd.exe cannot resolve goto labels in an LF batch file, so CPython's build fails with "The system cannot find the batch label specified - begin_search" and then "Cannot locate python.exe on PATH or as PYTHON variable". git init already runs in the extracted source, so setting core.autocrlf on the repository it creates is enough, without touching the shared PATCH_CMD.
This commit is contained in:
7
deps/python3/python3.cmake
vendored
7
deps/python3/python3.cmake
vendored
@@ -15,7 +15,12 @@ if(WIN32)
|
||||
# See https://github.com/python/cpython/issues/153438
|
||||
# Patch from https://github.com/python/cpython/pull/153608
|
||||
# This patch has not been merged to 3.12 yet so we need to apply it manually
|
||||
set(_patch_cmd git init && ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/01-windows-nuget.patch)
|
||||
#
|
||||
# The config lands on the CPython repo git init just made, not OrcaSlicer. Without
|
||||
# it the patched find_python.bat comes out LF and cmd.exe cannot find its goto labels.
|
||||
set(_patch_cmd git init
|
||||
&& git config core.autocrlf false
|
||||
&& ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/01-windows-nuget.patch)
|
||||
|
||||
if(MSVC_VERSION EQUAL 1800)
|
||||
set(_python_platform_toolset v120)
|
||||
|
||||
Reference in New Issue
Block a user