diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 562cd61c..a9782a35 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -25,7 +25,7 @@ jobs: mkdir -p ${VCPKG_DEFAULT_BINARY_CACHE} - uses: actions/cache@v3 with: - key: "v2339-${{ runner.os }}-${{ matrix.triplet }}" + key: "v2340-libtorch-${{ runner.os }}-${{ matrix.triplet }}" path: | /usr/local/share/vcpkg-downloads /usr/local/share/vcpkg-archives diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml index 2fc5eb0e..0f883285 100644 --- a/.github/workflows/build-ubuntu.yml +++ b/.github/workflows/build-ubuntu.yml @@ -26,7 +26,7 @@ jobs: VCPKG_DEFAULT_BINARY_CACHE: "${{ runner.temp }}/vcpkg-archives" - uses: actions/cache@v3 with: - key: "v2339-${{ runner.os }}-${{ matrix.triplet }}" + key: "v2340-libtorch-${{ runner.os }}-${{ matrix.triplet }}" path: | ${{ runner.temp }}/vcpkg-downloads ${{ runner.temp }}/vcpkg-archives diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 41017803..f45d4452 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -24,7 +24,7 @@ jobs: New-Item -Type Directory -Force ${env:VCPKG_DEFAULT_BINARY_CACHE} - uses: actions/cache@v3 with: - key: "v2339-${{ runner.os }}-${{ matrix.triplet }}" + key: "v2340-libtorch-${{ runner.os }}-${{ matrix.triplet }}" path: | C:/vcpkg/downloads C:/vcpkg/archives diff --git a/ports/libtorch/portfile.cmake b/ports/libtorch/portfile.cmake index 9d085357..3f31e269 100644 --- a/ports/libtorch/portfile.cmake +++ b/ports/libtorch/portfile.cmake @@ -26,12 +26,10 @@ vcpkg_execute_required_process( find_program(PROTOC NAMES protoc PATHS "${CURRENT_HOST_INSTALLED_DIR}/tools/protobuf" REQUIRED NO_DEFAULT_PATH NO_CMAKE_PATH) message(STATUS "Using protoc: ${PROTOC}") -x_vcpkg_get_python_packages( - PYTHON_VERSION 3 - PACKAGES typing-extensions pyyaml numpy sympy - OUT_PYTHON_VAR PYTHON3 -) +vcpkg_find_acquire_program(PYTHON3) message(STATUS "Using Python3: ${PYTHON3}") +get_filename_component(PYTHON_PATH "${PYTHON3}" PATH) +vcpkg_add_to_path(PREPEND "${PYTHON_PATH}") vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES diff --git a/ports/libtorch/vcpkg.json b/ports/libtorch/vcpkg.json index 563c9589..abce1bba 100644 --- a/ports/libtorch/vcpkg.json +++ b/ports/libtorch/vcpkg.json @@ -46,10 +46,6 @@ { "name": "vcpkg-cmake-config", "host": true - }, - { - "name": "vcpkg-get-python-packages", - "host": true } ], "default-features": [