Skip to content

Commit

Permalink
Merge branch 'main' into 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Oct 28, 2024
2 parents 021a271 + c8da2e9 commit 548a044
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
make ${{ matrix.target }} BUILD_NUMBER=${{ needs.config.outputs.BUILD_NUMBER }}
- name: Upload build artefacts
uses: actions/[email protected].0
uses: actions/[email protected].3
with:
name: Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
path: dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.target }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ ARCH-$(target)=$$(subst .,,$$(suffix $(target)))
ifneq ($(os),macOS)
ifeq ($$(findstring simulator,$$(SDK-$(target))),)
TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os))
IS_SIMULATOR-$(target)="False"
else
TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os))-simulator
IS_SIMULATOR-$(target)="True"
endif
endif

Expand Down Expand Up @@ -330,6 +332,9 @@ $$(PYTHON_SITECUSTOMIZE-$(target)):
cat $(PROJECT_DIR)/patch/Python/sitecustomize.$(os).py \
| sed -e "s/{{os}}/$(os)/g" \
| sed -e "s/{{arch}}/$$(ARCH-$(target))/g" \
| sed -e "s/{{version_min}}/$$(VERSION_MIN-$(os))/g" \
| sed -e "s/{{is_simulator}}/$$(IS_SIMULATOR-$(target))/g" \
| sed -e "s/{{multiarch}}/$$(ARCH-$(target))-$$(SDK-$(target))/g" \
| sed -e "s/{{tag}}/$$(OS_LOWER-$(target))-$$(VERSION_MIN-$(os))-$$(ARCH-$(target))-$$(SDK-$(target))/g" \
> $$(PYTHON_SITECUSTOMIZE-$(target))

Expand Down
17 changes: 16 additions & 1 deletion patch/Python/sitecustomize.iOS.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# packages cross-platform. If the folder containing this file is on
# your PYTHONPATH when you invoke pip, pip will behave as if it were
# running on {{os}}.
import collections
import distutils.ccompiler
import distutils.unixccompiler
import os
Expand All @@ -16,7 +17,21 @@ def custom_system():

platform.system = custom_system

# Make sysconfig.get_platform() return "{{tag}}"
# Make platform.ios_ver() return an appropriate namedtuple
IOSVersionInfo = collections.namedtuple(
"IOSVersionInfo",
["system", "release", "model", "is_simulator"]
)

def custom_ios_ver(system="", release="", model="", is_simulator=False):
return IOSVersionInfo("{{os}}", "{{version_min}}", "iPhone", {{is_simulator}})

platform.ios_ver = custom_ios_ver

# Make sys.implementation._multiarch return the multiarch description
sys.implementation._multiarch = "{{multiarch}}"

# Make sysconfig.get_platform() return the platform tag
def custom_get_platform():
return "{{tag}}"

Expand Down

0 comments on commit 548a044

Please sign in to comment.