Skip to content

Commit c953ff6

Browse files
committed
install tiny-pkg-config for windows ci
1 parent ff21a5d commit c953ff6

File tree

2 files changed

+34
-16
lines changed

2 files changed

+34
-16
lines changed

.github/assets/python3-embed.pc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
prefix=${pcfiledir}/../..
2+
exec_prefix=${prefix}
3+
libdir=${exec_prefix}
4+
includedir=${prefix}/include
5+
6+
Name: Python
7+
Description: Embed Python into an application
8+
Requires:
9+
Version: 3.13
10+
Libs.private:
11+
Libs: -L${libdir} -lpython313
12+
Cflags: -I${includedir}

.github/workflows/go.yml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,20 @@ jobs:
4646
sys:
4747
- {os: macos-latest, shell: bash}
4848
- {os: ubuntu-24.04, shell: bash}
49-
- {os: windows-latest, shell: 'msys2 {0}'}
49+
- {os: windows-latest, shell: bash}
5050
defaults:
5151
run:
5252
shell: ${{ matrix.sys.shell }}
5353
runs-on: ${{matrix.sys.os}}
5454
steps:
55-
- uses: msys2/setup-msys2@v2
56-
if: matrix.sys.os == 'windows-latest'
57-
with:
58-
update: true
59-
install: >-
60-
curl
61-
git
62-
pkg-config
55+
# - uses: msys2/setup-msys2@v2
56+
# if: matrix.sys.os == 'windows-latest'
57+
# with:
58+
# update: true
59+
# install: >-
60+
# curl
61+
# git
62+
# pkg-config
6363

6464
- uses: actions/checkout@v4
6565

@@ -73,16 +73,23 @@ jobs:
7373
python-version: '3.13'
7474
update-environment: true
7575

76-
- name: Test PKG_CONFIG_PATH
76+
- name: Generate Python pkg-config for windows (patch)
77+
if: matrix.sys.os == 'windows-latest'
78+
run: |
79+
mkdir -p $PKG_CONFIG_PATH
80+
cp .github/assets/python3-embed.pc $PKG_CONFIG_PATH/
81+
82+
- name: Install tiny-pkg-config for windows (patch)
7783
if: matrix.sys.os == 'windows-latest'
7884
run: |
79-
echo on
80-
dir /c/hostedtoolcache/windows/Python/3.13.0/x64/
81-
dir /c/hostedtoolcache/windows/Python/3.13.0/x64/lib
82-
dir /c/hostedtoolcache/windows/Python/3.13.0/x64/lib/pkgconfig
85+
set -x
86+
curl -L https://github.com/cpunion/tiny-pkg-config/releases/download/v0.2.0/tiny-pkg-config_Windows_x86_64.zip -o /tmp/tiny-pkg-config.zip
87+
unzip /tmp/tiny-pkg-config.zip -d $HOME/bin
88+
mv $HOME/bin/tiny-pkg-config.exe $HOME/bin/pkg-config.exe
8389
echo $PKG_CONFIG_PATH
84-
pkg-config --libs python-3.13-embed
90+
cat $PKG_CONFIG_PATH/python3-embed.pc
8591
pkg-config --libs python3-embed
92+
pkg-config --cflags python3-embed
8693
8794
- name: Build
8895
run: go install -v ./...
@@ -99,7 +106,6 @@ jobs:
99106
gopy install -v .
100107
101108
- name: Upload coverage to Codecov
102-
if: matrix.sys.os == 'ubuntu-24.04'
103109
uses: codecov/codecov-action@v4
104110
with:
105111
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)