Skip to content

Commit e0e7b8c

Browse files
committed
Explicitly set the python version for compiling wheels
1 parent 931ee12 commit e0e7b8c

1 file changed

Lines changed: 30 additions & 15 deletions

File tree

.github/workflows/main.yml

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,11 @@ jobs:
192192
submodules: true
193193
fetch-depth: 0
194194

195+
- name: Get Correct Python Version
196+
uses: actions/setup-python@v5
197+
with:
198+
python-version: '3.7'
199+
195200
- name: Configure CMake
196201
run: |
197202
cmake -B ${{github.workspace}}/pybuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_MAYA=NO -DMAYA_PYTHON=NO -DSYSTEM_PY_VERSION=3
@@ -203,12 +208,12 @@ jobs:
203208
204209
- name: Build Wheel
205210
run: |
206-
py -3 -m pip install -U pip
207-
py -3 -m pip install -U build wheel hatch
208-
py -3 -m hatch version $(git describe --tags --abbrev=0)
209-
py -3 -m build --wheel
211+
python -m pip install -U pip
212+
python -m pip install -U build wheel hatch
213+
python -m hatch version $(git describe --tags --abbrev=0)
214+
python -m build --wheel
210215
$PY_WHEEL = Get-ChildItem -Name dist/*.whl
211-
py -3 -m wheel tags --remove --python-tag cp3 --abi-tag abi3 --platform-tag win_amd64 dist/$PY_WHEEL
216+
python -m wheel tags --remove --python-tag cp37 --abi-tag abi3 --platform-tag win_amd64 dist/$PY_WHEEL
212217
213218
- name: Upload Artifacts
214219
uses: actions/upload-artifact@v4
@@ -229,6 +234,11 @@ jobs:
229234
submodules: true
230235
fetch-depth: 0
231236

237+
- name: Get Correct Python Version
238+
uses: actions/setup-python@v5
239+
with:
240+
python-version: '3.7'
241+
232242
- uses: maxim-lobanov/setup-xcode@v1
233243
with:
234244
xcode-version: '13.4'
@@ -244,13 +254,13 @@ jobs:
244254
245255
- name: Build Wheel
246256
run: |
247-
python3 -m pip install -U pip
248-
python3 -m pip install -U build wheel hatch
249-
python3 -m hatch version $(git describe --tags --abbrev=0)
250-
python3 -m build --wheel
257+
python -m pip install -U pip
258+
python -m pip install -U build wheel hatch
259+
python -m hatch version $(git describe --tags --abbrev=0)
260+
python -m build --wheel
251261
for PY_WHEEL in dist/*.whl
252262
do
253-
python3 -m wheel tags --remove --python-tag cp3 --abi-tag abi3 --platform-tag macosx_10_9_x86_64 ${PY_WHEEL}
263+
python -m wheel tags --remove --python-tag cp37 --abi-tag abi3 --platform-tag macosx_10_9_x86_64 ${PY_WHEEL}
254264
done
255265
256266
- name: Upload Artifacts
@@ -273,6 +283,11 @@ jobs:
273283
submodules: true
274284
fetch-depth: 0
275285

286+
- name: Get Correct Python Version
287+
uses: actions/setup-python@v5
288+
with:
289+
python-version: '3.7'
290+
276291
- name: Configure CMake
277292
run: |
278293
cmake -B ${{github.workspace}}/pybuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_MAYA=NO -DMAYA_PYTHON=NO -DSYSTEM_PY_VERSION=3
@@ -284,13 +299,13 @@ jobs:
284299
285300
- name: Build Wheel
286301
run: |
287-
python3 -m pip install -U pip
288-
python3 -m pip install -U build wheel hatch
289-
python3 -m hatch version $(git describe --tags --abbrev=0)
290-
python3 -m build --wheel
302+
python -m pip install -U pip
303+
python -m pip install -U build wheel hatch
304+
python -m hatch version $(git describe --tags --abbrev=0)
305+
python -m build --wheel
291306
for PY_WHEEL in dist/*.whl
292307
do
293-
python3 -m wheel tags --remove --python-tag cp3 --abi-tag abi3 --platform-tag manylinux_2_17_x86_64 ${PY_WHEEL}
308+
python -m wheel tags --remove --python-tag cp37 --abi-tag abi3 --platform-tag manylinux_2_17_x86_64 ${PY_WHEEL}
294309
done
295310
296311
- name: Upload Artifacts

0 commit comments

Comments
 (0)