Skip to content

Commit

Permalink
Change FindPython3.cmake.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Jan 24, 2024
1 parent 64f68dc commit 8fc344b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ jobs:
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
- name: Delete Python
shell: powershell
run: Remove-Item -Recurse -Force -Path "C:/hostedtoolcache/windows/Python"
- name: Build
shell: powershell
run: .\build.bat
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ jobs:
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
- name: Delete Python
shell: powershell
run: Remove-Item -Recurse -Force -Path "C:/hostedtoolcache/windows/Python"
- name: Build
shell: powershell
run: .\build.bat
Expand Down
18 changes: 9 additions & 9 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ echo include(FindPackageHandleStandardArgs)>> "%loc%\core\cmake\FindRuby.cmake"
echo FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ruby REQUIRED_VARS Ruby_EXECUTABLE Ruby_LIBRARY Ruby_INCLUDE_DIRS VERSION_VAR Ruby_VERSION)>> "%loc%\core\cmake\FindRuby.cmake"
echo mark_as_advanced(Ruby_EXECUTABLE Ruby_LIBRARY Ruby_INCLUDE_DIRS)>> "%loc%\core\cmake\FindRuby.cmake"

rem Patch for FindPython.cmake
echo set(Python3_VERSION 3.9.7)> "%loc%\core\cmake\FindPython.cmake"
echo set(Python3_ROOT_DIR "%escaped_loc%/runtimes/python")>> "%loc%\core\cmake\FindPython.cmake"
echo set(Python3_EXECUTABLE "%escaped_loc%/runtimes/python/python.exe")>> "%loc%\core\cmake\FindPython.cmake"
echo set(Python3_INCLUDE_DIRS "%escaped_loc%/runtimes/python/include")>> "%loc%\core\cmake\FindPython.cmake"
echo set(Python3_LIBRARIES "%escaped_loc%/runtimes/python/libs/python39.lib")>> "%loc%\core\cmake\FindPython.cmake"
echo include(FindPackageHandleStandardArgs)>> "%loc%\core\cmake\FindPython.cmake"
echo FIND_PACKAGE_HANDLE_STANDARD_ARGS(Python REQUIRED_VARS Python_EXECUTABLE Python_LIBRARIES Python_INCLUDE_DIRS VERSION_VAR Python_VERSION)>> "%loc%\core\cmake\FindPython.cmake"
echo mark_as_advanced(Python_EXECUTABLE Python_LIBRARIES Python_INCLUDE_DIRS)>> "%loc%\core\cmake\FindPython.cmake"
rem Patch for FindPython3.cmake
echo set(Python3_VERSION 3.9.7)> "%loc%\core\cmake\FindPython3.cmake"
echo set(Python3_ROOT_DIR "%escaped_loc%/runtimes/python")>> "%loc%\core\cmake\FindPython3.cmake"
echo set(Python3_EXECUTABLE "%escaped_loc%/runtimes/python/python.exe")>> "%loc%\core\cmake\FindPython3.cmake"
echo set(Python3_INCLUDE_DIRS "%escaped_loc%/runtimes/python/include")>> "%loc%\core\cmake\FindPython3.cmake"
echo set(Python3_LIBRARIES "%escaped_loc%/runtimes/python/libs/python39.lib")>> "%loc%\core\cmake\FindPython3.cmake"
echo include(FindPackageHandleStandardArgs)>> "%loc%\core\cmake\FindPython3.cmake"
echo FIND_PACKAGE_HANDLE_STANDARD_ARGS(Python REQUIRED_VARS Python_EXECUTABLE Python_LIBRARIES Python_INCLUDE_DIRS VERSION_VAR Python_VERSION)>> "%loc%\core\cmake\FindPython3.cmake"
echo mark_as_advanced(Python_EXECUTABLE Python_LIBRARIES Python_INCLUDE_DIRS)>> "%loc%\core\cmake\FindPython3.cmake"

rem Patch for FindCoreCLR.cmake
echo set(CoreCLR_VERSION 5.0.12)> "%loc%\core\cmake\FindCoreCLR.cmake"
Expand Down

0 comments on commit 8fc344b

Please sign in to comment.