Skip to content

Disable dSYM production #294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Jun 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
3a7cd86
More updates to USAGE and README (#250)
freakboy3742 Feb 17, 2025
1158013
Bump ncipollo/release-action from 1.15.0 to 1.16.0 (#253)
dependabot[bot] Feb 23, 2025
832d393
Bump actions/upload-artifact from 4.6.0 to 4.6.1 (#254)
dependabot[bot] Feb 23, 2025
aa545e9
Add patch for handling empty simulator lists.
freakboy3742 Feb 25, 2025
c794b06
Bump actions/download-artifact from 4.1.8 to 4.1.9 (#255)
dependabot[bot] Mar 3, 2025
0013ca0
Update patch for Python 3.14.0a6 (#258)
freakboy3742 Mar 18, 2025
ca43143
Bump actions/download-artifact from 4.1.9 to 4.2.1 (#265)
dependabot[bot] Mar 23, 2025
cfd548d
Bump actions/upload-artifact from 4.6.1 to 4.6.2 (#266)
dependabot[bot] Mar 23, 2025
db04fbd
Bump actions/setup-python from 5.4.0 to 5.5.0 (#267)
dependabot[bot] Mar 30, 2025
81428db
Add Python.patch Note to Contributing.md (#271)
johnzhou721 Apr 17, 2025
92d8d95
Add support for visionOS (#270)
johnzhou721 Apr 23, 2025
f8fd686
Fix an iOS reference in testbed cloning. (#272)
johnzhou721 Apr 23, 2025
344aaf6
Update patch to include visionOS plist changes.
freakboy3742 Apr 25, 2025
515625c
visionOS Support and Other Fixes (#276)
johnzhou721 Apr 27, 2025
e29c0fd
Bump actions/setup-python from 5.5.0 to 5.6.0 (#277)
dependabot[bot] Apr 27, 2025
80296f0
Bump actions/download-artifact from 4.2.1 to 4.3.0 (#278)
dependabot[bot] Apr 27, 2025
b5bed64
Ensure base_prefix is set in a cross-venv. (#279)
freakboy3742 May 1, 2025
7a7aad1
Document the Patch Tree Approach. (#281)
johnzhou721 May 4, 2025
6583edf
Update CONTRIBUTING.md for Grammar + Clarity (#282)
johnzhou721 May 4, 2025
a041905
Remove some useless PATHs in Usage.md (#284)
johnzhou721 May 6, 2025
76b7f30
Bump patch to Python 3.14.0b2. (#290)
freakboy3742 Jun 3, 2025
c012e5d
Add xcprivacy and dSYM handling (#285)
freakboy3742 Jun 3, 2025
8019835
Temporarily disable dSYM production. (#293)
freakboy3742 Jun 3, 2025
0ce461e
Merge branch 'main' into 3.13
freakboy3742 Jun 3, 2025
9dbe559
Remove visionOS references from README.
freakboy3742 Jun 3, 2025
1610cc0
Remove visionOS from CI.
freakboy3742 Jun 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,3 @@ jobs:
# watchOS build
curl -o watchOS-artefact.tar.gz -L https://github.com/beeware/Python-Apple-support/releases/download/${{ steps.build-vars.outputs.TAG }}/Python-${{ steps.build-vars.outputs.PYTHON_VER }}-watchOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz
aws s3 cp watchOS-artefact.tar.gz s3://briefcase-support/python/${{ steps.build-vars.outputs.PYTHON_VER }}/watchOS/Python-${{ steps.build-vars.outputs.PYTHON_VER }}-watchOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz
# visionOS build
curl -o visionOS-artefact.tar.gz -L https://github.com/beeware/Python-Apple-support/releases/download/${{ steps.build-vars.outputs.TAG }}/Python-${{ steps.build-vars.outputs.PYTHON_VER }}-visionOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz
aws s3 cp visionOS-artefact.tar.gz s3://briefcase-support/python/${{ steps.build-vars.outputs.PYTHON_VER }}/visionOS/Python-${{ steps.build-vars.outputs.PYTHON_VER }}-visionOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# - iOS - build everything for iOS
# - tvOS - build everything for tvOS
# - watchOS - build everything for watchOS
# - visionOS - build everything for visionOS

# Current directory
PROJECT_DIR=$(shell pwd)
Expand Down Expand Up @@ -57,6 +58,10 @@ TARGETS-watchOS=watchsimulator.x86_64 watchsimulator.arm64 watchos.arm64_32
TRIPLE_OS-watchOS=watchos
VERSION_MIN-watchOS=4.0

TARGETS-visionOS=xrsimulator.arm64 xros.arm64
TRIPLE_OS-visionOS=xros
VERSION_MIN-visionOS=2.0

# The architecture of the machine doing the build
HOST_ARCH=$(shell uname -m)
HOST_PYTHON=$(shell which python$(PYTHON_VER))
Expand Down Expand Up @@ -452,7 +457,8 @@ $$(PYTHON_LIB-$(sdk)): $$(foreach target,$$(SDK_TARGETS-$(sdk)),$$(PYTHON_LIB-$$
mkdir -p $$(dir $$(PYTHON_LIB-$(sdk)))
lipo -create -output $$@ $$^ \
2>&1 | tee -a install/$(os)/$(sdk)/python-$(PYTHON_VERSION).lipo.log
dsymutil $$@ -o $$(PYTHON_INSTALL-$(sdk))/Python.dSYM
# Disable dSYM production (for now)
# dsymutil $$@ -o $$(PYTHON_INSTALL-$(sdk))/Python.dSYM

$$(PYTHON_FRAMEWORK-$(sdk))/Info.plist: $$(PYTHON_LIB-$(sdk))
@echo ">>> Install Info.plist for the $(sdk) SDK"
Expand Down Expand Up @@ -517,8 +523,9 @@ $$(PYTHON_STDLIB-$(sdk))/LICENSE.TXT: $$(PYTHON_LIB-$(sdk)) $$(PYTHON_FRAMEWORK-
# Merge the binary modules from each target in the $(sdk) SDK into a single binary
$$(foreach module,$$(wildcard $$(PYTHON_STDLIB-$$(firstword $$(SDK_TARGETS-$(sdk))))/lib-dynload/*),lipo -create -output $$(PYTHON_STDLIB-$(sdk))/lib-dynload/$$(notdir $$(module)) $$(foreach target,$$(SDK_TARGETS-$(sdk)),$$(PYTHON_STDLIB-$$(target))/lib-dynload/$$(notdir $$(module))); )

# Create dSYM files for each module
$$(foreach module,$$(wildcard $$(PYTHON_STDLIB-$$(firstword $$(SDK_TARGETS-$(sdk))))/lib-dynload/*),dsymutil $$(PYTHON_STDLIB-$(sdk))/lib-dynload/$$(notdir $$(module)); )
# # Disable dSYM production (for now)
# # Create dSYM files for each module
# $$(foreach module,$$(wildcard $$(PYTHON_STDLIB-$$(firstword $$(SDK_TARGETS-$(sdk))))/lib-dynload/*),dsymutil $$(PYTHON_STDLIB-$(sdk))/lib-dynload/$$(notdir $$(module)); )

# Copy in known-required xcprivacy files.
# Libraries linking OpenSSL must provide a privacy manifest. The one in this repository
Expand Down Expand Up @@ -662,7 +669,8 @@ $$(PYTHON_XCFRAMEWORK-$(os))/Info.plist: \
$$(foreach sdk,$$(SDKS-$(os)),cp -r $$(PYTHON_INSTALL-$$(sdk))/bin $$(PYTHON_XCFRAMEWORK-$(os))/$$(SDK_SLICE-$$(sdk)); )
$$(foreach sdk,$$(SDKS-$(os)),cp -r $$(PYTHON_INSTALL-$$(sdk))/lib $$(PYTHON_XCFRAMEWORK-$(os))/$$(SDK_SLICE-$$(sdk)); )
$$(foreach sdk,$$(SDKS-$(os)),cp -r $$(PYTHON_INSTALL-$$(sdk))/platform-config $$(PYTHON_XCFRAMEWORK-$(os))/$$(SDK_SLICE-$$(sdk)); )
$$(foreach sdk,$$(SDKS-$(os)),cp -r $$(PYTHON_INSTALL-$$(sdk))/Python.dSYM $$(PYTHON_XCFRAMEWORK-$(os))/$$(SDK_SLICE-$$(sdk)); )
# Disable dSYM production (for now)
# $$(foreach sdk,$$(SDKS-$(os)),cp -r $$(PYTHON_INSTALL-$$(sdk))/Python.dSYM $$(PYTHON_XCFRAMEWORK-$(os))/$$(SDK_SLICE-$$(sdk)); )

ifeq ($(filter $(os),iOS visionOS),$(os))
@echo ">>> Clone testbed project for $(os)"
Expand Down
22 changes: 9 additions & 13 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Python Apple Support
====================

This is a meta-package for building a version of Python that can be embedded
into a macOS, iOS, tvOS, watchOS, or visionOS project.
into a macOS, iOS, tvOS, watchOS project.

**This branch builds a packaged version of Python 3.13**.
Other Python versions are available by cloning other branches of the main
Expand All @@ -23,16 +23,15 @@ The macOS package is a re-bundling of the official macOS binary, modified so tha
it is relocatable, with the IDLE, Tkinter and turtle packages removed, and the
App Store compliance patch applied.

The iOS, tvOS, watchOS, and visionOS packages compiled by this project use the
The iOS, tvOS, and watchOS packages compiled by this project use the
official `PEP 730 <https://peps.python.org/pep-0730/>`__ code that is part of
Python 3.13 to provide iOS support; the relevant patches have been backported
to 3.9-3.12. Additional patches have been applied to add tvOS, watchOS, and
visionOS support.
to 3.9-3.12. Additional patches have been applied to add tvOS, and watchOS
support.

The binaries support x86_64 and arm64 for macOS; arm64 for iOS and appleTV
devices; arm64_32 for watchOS devices; and arm64 for visionOS devices. It also
supports device simulators on both x86_64 and M1 hardware, except for visionOS,
for which x86_64 simulators are officially unsupported. This should enable the
devices; and arm64_32 for watchOS devices. It also
supports device simulators on both x86_64 and M1 hardware. This should enable the
code to run on:

* macOS 11 (Big Sur) or later, on:
Expand All @@ -52,8 +51,6 @@ code to run on:
* Apple TV (4th gen or later)
* watchOS 4.0 or later, on:
* Apple Watch (4th gen or later)
* visionOS 2.0 or later, on:
* Apple Vision Pro

Quickstart
----------
Expand All @@ -74,7 +71,6 @@ repository, and then in the root directory, and run:
* ``make iOS`` to build everything for iOS.
* ``make tvOS`` to build everything for tvOS.
* ``make watchOS`` to build everything for watchOS.
* ``make visionOS`` to build everything for visionOS.

This should:

Expand All @@ -91,7 +87,7 @@ Each support package contains:
support package;
* ``Python.xcframework``, a multi-architecture build of the Python runtime library.

On iOS/tvOS/watchOS/visionOS, the ``Python.xcframework`` contains a
On iOS/tvOS/watchOS, the ``Python.xcframework`` contains a
slice for each supported ABI (device and simulator). The folder containing the
slice can also be used as a ``PYTHONHOME``, as it contains a ``bin``, ``include``
and ``lib`` directory.
Expand Down Expand Up @@ -137,8 +133,8 @@ Building binary wheels
This project packages the Python standard library, but does not address building
binary wheels. Binary wheels for macOS can be obtained from PyPI. `Mobile Forge
<https://github.com/beeware/mobile-forge>`__ is a project that provides the
tooling to build build binary wheels for iOS (and potentially for tvOS, watchOS,
and visionOS, although that hasn't been tested).
tooling to build build binary wheels for iOS (and potentially for tvOS and watchOS
although that hasn't been tested).

Historical support
------------------
Expand Down
4 changes: 2 additions & 2 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ guides:
* [macOS](https://docs.python.org/3/using/mac.html)
* [iOS](https://docs.python.org/3/using/ios.html#adding-python-to-an-ios-project)

For tvOS, watchOS, and visionOS, you should be able to broadly follow the instructions
For tvOS, and watchOS, you should be able to broadly follow the instructions
in the iOS guide, changing some platform names in the first script. The testbed projects
generated on iOS and visionOS may be used as rough references as well.
generated on iOS may be used as rough references as well.

### Using Objective C

Expand Down