Skip to content

Commit 69c64ca

Browse files
committed
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
1 parent d03fb3d commit 69c64ca

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

.github/workflows/msvc-env.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,32 @@ on:
99
jobs:
1010
build:
1111
runs-on: windows-latest
12+
name: Build with introspection=${{ matrix.build_introspection }}
1213
env:
1314
PYTHONIOENCODING: "utf-8"
15+
GIR_BUILD: ""
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
build_introspection: [ true, false ]
1420
steps:
1521
- uses: actions/checkout@master
1622
- uses: actions/setup-python@v1
1723
- uses: seanmiddleditch/gha-setup-vsdevenv@master
24+
- name: Install GTK
25+
if: matrix.build_introspection
26+
run: |
27+
$WebClient = New-Object System.Net.WebClient
28+
$WebClient.DownloadFile("https://github.com/deluge-torrent/gvsbuild-release/releases/download/latest/gvsbuild-py3.10-vs16-x64.zip","C:\GTK.zip")
29+
7z x C:\GTK.zip -oC:\GTK
30+
echo "C:\GTK\release\lib" | Out-File -FilePath $env:GITHUB_PATH -Append
31+
echo "C:\GTK\release\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
32+
echo "C:\GTK\release" | Out-File -FilePath $env:GITHUB_PATH -Append
33+
echo "GIR_BUILD=-Dintrospection=enabled" >> $GITHUB_ENV
1834
- uses: BSFishy/meson-build@v1.0.3
1935
with:
2036
action: test
2137
directory: _build
38+
setup-options: ${{ env.GIR_BUILD }}
2239
options: "--verbose"
2340
meson-version: "0.55.3"

src/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ graphene_dep_sources = []
9797

9898
# Introspection
9999
if build_gir
100-
python = python.find_installation('python3')
100+
python = python.find_installation()
101101
identfilter_py = join_paths(meson.current_source_dir(), 'identfilter.py')
102102

103103
gir_extra_args = [

0 commit comments

Comments
 (0)