From 69c64ca00a8beb388a93bd4696596512e78e4587 Mon Sep 17 00:00:00 2001 From: DjLegolas Date: Fri, 19 Apr 2024 03:09:11 +0300 Subject: [PATCH] build: fix python search for gobject integration When compiling with Gobject integration on Windows, the build fails because it finds the incorrect python interpreter. Closes: #265 --- .github/workflows/msvc-env.yml | 17 +++++++++++++++++ src/meson.build | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/msvc-env.yml b/.github/workflows/msvc-env.yml index b462135..aa2bed2 100644 --- a/.github/workflows/msvc-env.yml +++ b/.github/workflows/msvc-env.yml @@ -9,15 +9,32 @@ on: jobs: build: runs-on: windows-latest + name: Build with introspection=${{ matrix.build_introspection }} env: PYTHONIOENCODING: "utf-8" + GIR_BUILD: "" + strategy: + fail-fast: false + matrix: + build_introspection: [ true, false ] steps: - uses: actions/checkout@master - uses: actions/setup-python@v1 - uses: seanmiddleditch/gha-setup-vsdevenv@master + - name: Install GTK + if: matrix.build_introspection + run: | + $WebClient = New-Object System.Net.WebClient + $WebClient.DownloadFile("https://github.com/deluge-torrent/gvsbuild-release/releases/download/latest/gvsbuild-py3.10-vs16-x64.zip","C:\GTK.zip") + 7z x C:\GTK.zip -oC:\GTK + echo "C:\GTK\release\lib" | Out-File -FilePath $env:GITHUB_PATH -Append + echo "C:\GTK\release\bin" | Out-File -FilePath $env:GITHUB_PATH -Append + echo "C:\GTK\release" | Out-File -FilePath $env:GITHUB_PATH -Append + echo "GIR_BUILD=-Dintrospection=enabled" >> $GITHUB_ENV - uses: BSFishy/meson-build@v1.0.3 with: action: test directory: _build + setup-options: ${{ env.GIR_BUILD }} options: "--verbose" meson-version: "0.55.3" diff --git a/src/meson.build b/src/meson.build index 29c1920..d701de4 100644 --- a/src/meson.build +++ b/src/meson.build @@ -97,7 +97,7 @@ graphene_dep_sources = [] # Introspection if build_gir - python = python.find_installation('python3') + python = python.find_installation() identfilter_py = join_paths(meson.current_source_dir(), 'identfilter.py') gir_extra_args = [