Skip to content

Commit cfdd330

Browse files
Super destructive attempt to use correct linking
1 parent 17a9978 commit cfdd330

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

.github/workflows/build_wheels.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ on:
1212

1313
jobs:
1414
build_wheels:
15-
name: Build Python Wheels on ${{ matrix.os }}
15+
name: Build Python Wheels on ${{ matrix.os }} (for ${{ matrix.python_version }})
1616
runs-on: ${{ matrix.os }}
1717
strategy:
1818
matrix:
19-
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14]
19+
#os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14]
20+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest]
2021
python_version: ["cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*"]
2122
exclude:
2223
- os: windows-latest
@@ -77,8 +78,8 @@ jobs:
7778
- name: Install Windows Dependencies
7879
if: matrix.os == 'windows-latest'
7980
run: |
80-
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
81-
choco install ninja
81+
# choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
82+
# choco install ninja
8283
choco install msys2
8384
C:\tools\msys64\usr\bin\bash -lc "pacman -Sy --noconfirm \
8485
mingw-w64-clang-x86_64-cmake \
@@ -103,7 +104,9 @@ jobs:
103104
pacman -U --noconfirm mingw-w64-clang-x86_64-python-pip-23.1.2-1-any.pkg.tar.zst && pacman -Ql mingw-w64-clang-x86_64-python-pip | grep bin/pip && \
104105
ln -sf /clang64/bin/python3.10.exe /clang64/bin/python3 && \
105106
/clang64/bin/python3 --version"
106-
echo '$(which python3)/../..'
107+
echo "$(which python3)"
108+
echo "CUSTOM_PYTHON_BIN=$(which python3)" >> $GITHUB_ENV
109+
echo "CUSTOM_PYTHON_ROOT=$(dirname $(dirname $(which python3)))" >> $GITHUB_ENV
107110
108111
- name: Fix windows python version for python3.11
109112
if: matrix.os == 'windows-latest' && matrix.python_version == 'cp311-*'
@@ -115,14 +118,18 @@ jobs:
115118
pacman -U --noconfirm mingw-w64-clang-x86_64-python-pip-23.3.2-1-any.pkg.tar.zst && pacman -Ql mingw-w64-clang-x86_64-python-pip | grep bin/pip && \
116119
ln -sf /clang64/bin/python3.11.exe /clang64/bin/python3 && \
117120
/clang64/bin/python3 --version"
118-
echo '$(which python3)/../..'
121+
echo "$(which python3)"
122+
echo "CUSTOM_PYTHON_BIN=$(which python3)" >> $GITHUB_ENV
123+
echo "CUSTOM_PYTHON_ROOT=$(dirname $(dirname $(which python3)))" >> $GITHUB_ENV
119124
120125
- name: Fix windows python version for python3.12
121126
if: matrix.os == 'windows-latest' && matrix.python_version == 'cp312-*'
122127
run: |
123128
C:\tools\msys64\usr\bin\bash -lc "pacman -Sy mingw-w64-clang-x86_64-python mingw-w64-clang-x86_64-python-pip"
124-
echo '$(which python3)/../..'
125-
# C:\tools\msys64\usr\bin\bash -lc " \
129+
echo "$(which python3)"
130+
echo "CUSTOM_PYTHON_BIN=$(which python3)" >> $GITHUB_ENV
131+
echo "CUSTOM_PYTHON_ROOT=$(dirname $(dirname $(which python3)))" >> $GITHUB_ENV
132+
# C:\tools\msys64\usr\bin\bash -lc " \
126133
# curl -LO https://repo.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-python3.12-3.12.7-1-any.pkg.tar.zst && \
127134
# curl -LO https://repo.msys2.org/mingw/clang64/mingw-w64-clang-x86_64-python-pip-25.0.1-1-any.pkg.tar.zst && \
128135
# pacman -U --noconfirm mingw-w64-clang-x86_64-python3.12-3.12.7-1-any.pkg.tar.zst && pacman -Ql mingw-w64-clang-x86_64-python3.12 | grep bin/python && \
@@ -135,13 +142,14 @@ jobs:
135142
if: matrix.os == 'windows-latest'
136143
env:
137144
CIBW_BUILD: ${{ matrix.python_version }}
138-
CIBW_ARCHES: "native"
139-
CIBW_BEFORE_BUILD: "pip install cmake ninja && ln "
145+
CIBW_ARCHS_WINDOWS: "native"
146+
CIBW_BEFORE_BUILD: "pip install cmake ninja && rm -r /mingw64/* "
147+
CIBW_PYTHON_BIN: ${{ env.CUSTOM_PYTHON_BIN }}
140148
CIBW_ENVIRONMENT: >
141149
CC=clang
142150
CXX=clang++
143151
CMAKE_GENERATOR=Ninja
144-
PYTHON_ROOT=$(which python3)/../..
152+
PYTHON_ROOT=${{ env.CUSTOM_PYTHON_ROOT }}
145153
# with:
146154
# package-dir: .
147155
# output-dir: wheelhouse

0 commit comments

Comments
 (0)