Skip to content

Commit 548a044

Browse files
committed
Merge branch 'main' into 3.11
2 parents 021a271 + c8da2e9 commit 548a044

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
make ${{ matrix.target }} BUILD_NUMBER=${{ needs.config.outputs.BUILD_NUMBER }}
122122
123123
- name: Upload build artefacts
124-
uses: actions/[email protected].0
124+
uses: actions/[email protected].3
125125
with:
126126
name: Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
127127
path: dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,10 @@ ARCH-$(target)=$$(subst .,,$$(suffix $(target)))
135135
ifneq ($(os),macOS)
136136
ifeq ($$(findstring simulator,$$(SDK-$(target))),)
137137
TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os))
138+
IS_SIMULATOR-$(target)="False"
138139
else
139140
TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os))-simulator
141+
IS_SIMULATOR-$(target)="True"
140142
endif
141143
endif
142144

@@ -330,6 +332,9 @@ $$(PYTHON_SITECUSTOMIZE-$(target)):
330332
cat $(PROJECT_DIR)/patch/Python/sitecustomize.$(os).py \
331333
| sed -e "s/{{os}}/$(os)/g" \
332334
| sed -e "s/{{arch}}/$$(ARCH-$(target))/g" \
335+
| sed -e "s/{{version_min}}/$$(VERSION_MIN-$(os))/g" \
336+
| sed -e "s/{{is_simulator}}/$$(IS_SIMULATOR-$(target))/g" \
337+
| sed -e "s/{{multiarch}}/$$(ARCH-$(target))-$$(SDK-$(target))/g" \
333338
| sed -e "s/{{tag}}/$$(OS_LOWER-$(target))-$$(VERSION_MIN-$(os))-$$(ARCH-$(target))-$$(SDK-$(target))/g" \
334339
> $$(PYTHON_SITECUSTOMIZE-$(target))
335340

patch/Python/sitecustomize.iOS.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# packages cross-platform. If the folder containing this file is on
33
# your PYTHONPATH when you invoke pip, pip will behave as if it were
44
# running on {{os}}.
5+
import collections
56
import distutils.ccompiler
67
import distutils.unixccompiler
78
import os
@@ -16,7 +17,21 @@ def custom_system():
1617

1718
platform.system = custom_system
1819

19-
# Make sysconfig.get_platform() return "{{tag}}"
20+
# Make platform.ios_ver() return an appropriate namedtuple
21+
IOSVersionInfo = collections.namedtuple(
22+
"IOSVersionInfo",
23+
["system", "release", "model", "is_simulator"]
24+
)
25+
26+
def custom_ios_ver(system="", release="", model="", is_simulator=False):
27+
return IOSVersionInfo("{{os}}", "{{version_min}}", "iPhone", {{is_simulator}})
28+
29+
platform.ios_ver = custom_ios_ver
30+
31+
# Make sys.implementation._multiarch return the multiarch description
32+
sys.implementation._multiarch = "{{multiarch}}"
33+
34+
# Make sysconfig.get_platform() return the platform tag
2035
def custom_get_platform():
2136
return "{{tag}}"
2237

0 commit comments

Comments
 (0)