Skip to content

Commit 098da6b

Browse files
committed
Merge branch 'main' into 3.10
2 parents 208df40 + c8da2e9 commit 098da6b

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
make ${{ matrix.target }} BUILD_NUMBER=${{ needs.config.outputs.BUILD_NUMBER }}
116116
117117
- name: Upload build artefacts
118-
uses: actions/[email protected].0
118+
uses: actions/[email protected].3
119119
with:
120120
name: Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
121121
path: dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz

Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,10 @@ ARCH-$(target)=$$(subst .,,$$(suffix $(target)))
128128
ifneq ($(os),macOS)
129129
ifeq ($$(findstring simulator,$$(SDK-$(target))),)
130130
TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os))
131+
IS_SIMULATOR-$(target)="False"
131132
else
132133
TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os))-simulator
134+
IS_SIMULATOR-$(target)="True"
133135
endif
134136
endif
135137

@@ -297,6 +299,9 @@ $$(PYTHON_SITECUSTOMIZE-$(target)):
297299
cat $(PROJECT_DIR)/patch/Python/sitecustomize.$(os).py \
298300
| sed -e "s/{{os}}/$(os)/g" \
299301
| sed -e "s/{{arch}}/$$(ARCH-$(target))/g" \
302+
| sed -e "s/{{version_min}}/$$(VERSION_MIN-$(os))/g" \
303+
| sed -e "s/{{is_simulator}}/$$(IS_SIMULATOR-$(target))/g" \
304+
| sed -e "s/{{multiarch}}/$$(ARCH-$(target))-$$(SDK-$(target))/g" \
300305
| sed -e "s/{{tag}}/$$(OS_LOWER-$(target))-$$(VERSION_MIN-$(os))-$$(ARCH-$(target))-$$(SDK-$(target))/g" \
301306
> $$(PYTHON_SITECUSTOMIZE-$(target))
302307

patch/Python/sitecustomize.iOS.py

+16-1
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)