Skip to content
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

Add support for iOS as a target platform #114099

Closed
freakboy3742 opened this issue Jan 16, 2024 · 5 comments · Fixed by #118020
Closed

Add support for iOS as a target platform #114099

freakboy3742 opened this issue Jan 16, 2024 · 5 comments · Fixed by #118020
Labels
OS-ios type-feature A feature request or enhancement

Comments

@freakboy3742
Copy link
Contributor

freakboy3742 commented Jan 16, 2024

Feature or enhancement

Proposal:

As proposed by PEP 730, it should be possible to compile and run CPython on iOS.

This is a meta-issue for the various PRs implementing this support to reference.

For historical reference: this was previously managed as #67858 (BPO23670).

Has this already been discussed elsewhere?

I have already discussed this feature proposal on Discourse

Links to previous discussion of this feature:

PEP 730 Discussion thread

Linked PRs

@freakboy3742 freakboy3742 added the type-feature A feature request or enhancement label Jan 16, 2024
erlend-aasland pushed a commit that referenced this issue Feb 5, 2024
…OS (#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
…e on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
erlend-aasland pushed a commit that referenced this issue Feb 12, 2024
…ameworks (#115120)

Part of the PEP 730 work to add iOS support.

This change lays the groundwork for introducing iOS/tvOS/watchOS 
frameworks; it includes the structural refactoring needed so that iOS
branches can be added into in a subsequent PR.

Summary of changes:
* Updates config.sub to the 2024-01-01 release. This is the "as 
  released" version of config.sub.
* Adds a RESSRCDIR variable to allow sharing of macOS and iOS Makefile 
  steps.
* Adds an INSTALLTARGETS variable so platforms can customise which
  targets are actually installed. This will be used to exclude certain
  targets (e.g., binaries, manfiles) from iOS framework installs.
* Adds a PYTHONFRAMEWORKINSTALLNAMEPREFIX variable; this is used as
  the install name for the library. This is needed to allow for iOS
  frameworks to specify an @rpath-based install name.
* Evaluates MACHDEP earlier in the configure process so that
  ac_sys_system is available.
* Modifies _PYTHON_HOST_PLATFORM evaluation for cross-platform builds
  so that the CPU architecture is differentiated from the host
  identifier. This will be used to generate a _PYTHON_HOST_PLATFORM
  definition that includes ABI information, not just CPU architecture.
* Differentiates between SOABI_PLATFORM and PLATFORM_TRIPLET.
  SOABI_PLATFORM is used in binary module names, and includes the ABI,
  but not the OS or CPU architecture (e.g.,
  math.cpython-313-iphonesimulator.dylib). PLATFORM_TRIPLET is used
  as the sys._multiarch value, and on iOS will contains the ABI and
  architecture (e.g., iphoneos-arm64). This differentiation hasn't
  historically been needed because while macOS is a multiarch platform,
  it uses a bare darwin as PLATFORM_TRIPLE.
* Removes the use of the deprecated -Wl,-single_module flag when
  compiling macOS frameworks.
* Some whitespace normalisation where there was a mix of spaces and tabs 
  in a single block.
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this issue Feb 14, 2024
…e on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this issue Feb 14, 2024
…cOS frameworks (python#115120)

Part of the PEP 730 work to add iOS support.

This change lays the groundwork for introducing iOS/tvOS/watchOS 
frameworks; it includes the structural refactoring needed so that iOS
branches can be added into in a subsequent PR.

Summary of changes:
* Updates config.sub to the 2024-01-01 release. This is the "as 
  released" version of config.sub.
* Adds a RESSRCDIR variable to allow sharing of macOS and iOS Makefile 
  steps.
* Adds an INSTALLTARGETS variable so platforms can customise which
  targets are actually installed. This will be used to exclude certain
  targets (e.g., binaries, manfiles) from iOS framework installs.
* Adds a PYTHONFRAMEWORKINSTALLNAMEPREFIX variable; this is used as
  the install name for the library. This is needed to allow for iOS
  frameworks to specify an @rpath-based install name.
* Evaluates MACHDEP earlier in the configure process so that
  ac_sys_system is available.
* Modifies _PYTHON_HOST_PLATFORM evaluation for cross-platform builds
  so that the CPU architecture is differentiated from the host
  identifier. This will be used to generate a _PYTHON_HOST_PLATFORM
  definition that includes ABI information, not just CPU architecture.
* Differentiates between SOABI_PLATFORM and PLATFORM_TRIPLET.
  SOABI_PLATFORM is used in binary module names, and includes the ABI,
  but not the OS or CPU architecture (e.g.,
  math.cpython-313-iphonesimulator.dylib). PLATFORM_TRIPLET is used
  as the sys._multiarch value, and on iOS will contains the ABI and
  architecture (e.g., iphoneos-arm64). This differentiation hasn't
  historically been needed because while macOS is a multiarch platform,
  it uses a bare darwin as PLATFORM_TRIPLE.
* Removes the use of the deprecated -Wl,-single_module flag when
  compiling macOS frameworks.
* Some whitespace normalisation where there was a mix of spaces and tabs 
  in a single block.
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this issue Mar 4, 2024
ned-deily pushed a commit that referenced this issue Mar 19, 2024
vstinner pushed a commit to vstinner/cpython that referenced this issue Mar 20, 2024
adorilson pushed a commit to adorilson/cpython that referenced this issue Mar 25, 2024
adorilson pushed a commit to adorilson/cpython that referenced this issue Mar 25, 2024
@FFY00
Copy link
Member

FFY00 commented Mar 25, 2024

AFAICT, the iOS buildbots haven't been added yet. Is this being tracked anywhere?

@freakboy3742
Copy link
Contributor Author

@FFY00 There's no specific ticket for adding an iOS buildbot (that I'm aware of, anyway); I'm happy to add a ticket if there should be one.

A status update on buildbots - I'm currently wrangling Anaconda's procurement processes to get an ARM64 macOS box provisioned. This has proven a much more complex request than I originally anticipated, due to the availability of arm64 macOS cloud hardware.

As a last resort, I have an ARM64 Mac mini that I can donate to the cause; however, I'd rather not make my home network part of critical CPython infrastructure :-)

ned-deily added a commit that referenced this issue Mar 28, 2024
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Malcolm Smith <[email protected]>
Co-authored-by: Ned Deily <[email protected]>
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
…ythonGH-117052)

Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Malcolm Smith <[email protected]>
Co-authored-by: Ned Deily <[email protected]>
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
…117057)

Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Jacob Coffee <[email protected]>
Co-authored-by: Malcolm Smith <[email protected]>
Co-authored-by: Ned Deily <[email protected]>
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
…st suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
… non-macOS frameworks (python#115120)

Part of the PEP 730 work to add iOS support.

This change lays the groundwork for introducing iOS/tvOS/watchOS
frameworks; it includes the structural refactoring needed so that iOS
branches can be added into in a subsequent PR.

Summary of changes:
* Updates config.sub to the 2024-01-01 release. This is the "as
  released" version of config.sub.
* Adds a RESSRCDIR variable to allow sharing of macOS and iOS Makefile
  steps.
* Adds an INSTALLTARGETS variable so platforms can customise which
  targets are actually installed. This will be used to exclude certain
  targets (e.g., binaries, manfiles) from iOS framework installs.
* Adds a PYTHONFRAMEWORKINSTALLNAMEPREFIX variable; this is used as
  the install name for the library. This is needed to allow for iOS
  frameworks to specify an @rpath-based install name.
* Evaluates MACHDEP earlier in the configure process so that
  ac_sys_system is available.
* Modifies _PYTHON_HOST_PLATFORM evaluation for cross-platform builds
  so that the CPU architecture is differentiated from the host
  identifier. This will be used to generate a _PYTHON_HOST_PLATFORM
  definition that includes ABI information, not just CPU architecture.
* Differentiates between SOABI_PLATFORM and PLATFORM_TRIPLET.
  SOABI_PLATFORM is used in binary module names, and includes the ABI,
  but not the OS or CPU architecture (e.g.,
  math.cpython-313-iphonesimulator.dylib). PLATFORM_TRIPLET is used
  as the sys._multiarch value, and on iOS will contains the ABI and
  architecture (e.g., iphoneos-arm64). This differentiation hasn't
  historically been needed because while macOS is a multiarch platform,
  it uses a bare darwin as PLATFORM_TRIPLE.
* Removes the use of the deprecated -Wl,-single_module flag when
  compiling macOS frameworks.
* Some whitespace normalisation where there was a mix of spaces and tabs
  in a single block.
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
…ythonGH-117052)

Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Malcolm Smith <[email protected]>
Co-authored-by: Ned Deily <[email protected]>
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
…117057)

Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Jacob Coffee <[email protected]>
Co-authored-by: Malcolm Smith <[email protected]>
Co-authored-by: Ned Deily <[email protected]>
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
…st suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
… non-macOS frameworks (python#115120)

Part of the PEP 730 work to add iOS support.

This change lays the groundwork for introducing iOS/tvOS/watchOS
frameworks; it includes the structural refactoring needed so that iOS
branches can be added into in a subsequent PR.

Summary of changes:
* Updates config.sub to the 2024-01-01 release. This is the "as
  released" version of config.sub.
* Adds a RESSRCDIR variable to allow sharing of macOS and iOS Makefile
  steps.
* Adds an INSTALLTARGETS variable so platforms can customise which
  targets are actually installed. This will be used to exclude certain
  targets (e.g., binaries, manfiles) from iOS framework installs.
* Adds a PYTHONFRAMEWORKINSTALLNAMEPREFIX variable; this is used as
  the install name for the library. This is needed to allow for iOS
  frameworks to specify an @rpath-based install name.
* Evaluates MACHDEP earlier in the configure process so that
  ac_sys_system is available.
* Modifies _PYTHON_HOST_PLATFORM evaluation for cross-platform builds
  so that the CPU architecture is differentiated from the host
  identifier. This will be used to generate a _PYTHON_HOST_PLATFORM
  definition that includes ABI information, not just CPU architecture.
* Differentiates between SOABI_PLATFORM and PLATFORM_TRIPLET.
  SOABI_PLATFORM is used in binary module names, and includes the ABI,
  but not the OS or CPU architecture (e.g.,
  math.cpython-313-iphonesimulator.dylib). PLATFORM_TRIPLET is used
  as the sys._multiarch value, and on iOS will contains the ABI and
  architecture (e.g., iphoneos-arm64). This differentiation hasn't
  historically been needed because while macOS is a multiarch platform,
  it uses a bare darwin as PLATFORM_TRIPLE.
* Removes the use of the deprecated -Wl,-single_module flag when
  compiling macOS frameworks.
* Some whitespace normalisation where there was a mix of spaces and tabs
  in a single block.
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
…ythonGH-117052)

Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Malcolm Smith <[email protected]>
Co-authored-by: Ned Deily <[email protected]>
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
…t suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
…non-macOS frameworks (python#115120)

Part of the PEP 730 work to add iOS support.

This change lays the groundwork for introducing iOS/tvOS/watchOS
frameworks; it includes the structural refactoring needed so that iOS
branches can be added into in a subsequent PR.

Summary of changes:
* Updates config.sub to the 2024-01-01 release. This is the "as
  released" version of config.sub.
* Adds a RESSRCDIR variable to allow sharing of macOS and iOS Makefile
  steps.
* Adds an INSTALLTARGETS variable so platforms can customise which
  targets are actually installed. This will be used to exclude certain
  targets (e.g., binaries, manfiles) from iOS framework installs.
* Adds a PYTHONFRAMEWORKINSTALLNAMEPREFIX variable; this is used as
  the install name for the library. This is needed to allow for iOS
  frameworks to specify an @rpath-based install name.
* Evaluates MACHDEP earlier in the configure process so that
  ac_sys_system is available.
* Modifies _PYTHON_HOST_PLATFORM evaluation for cross-platform builds
  so that the CPU architecture is differentiated from the host
  identifier. This will be used to generate a _PYTHON_HOST_PLATFORM
  definition that includes ABI information, not just CPU architecture.
* Differentiates between SOABI_PLATFORM and PLATFORM_TRIPLET.
  SOABI_PLATFORM is used in binary module names, and includes the ABI,
  but not the OS or CPU architecture (e.g.,
  math.cpython-313-iphonesimulator.dylib). PLATFORM_TRIPLET is used
  as the sys._multiarch value, and on iOS will contains the ABI and
  architecture (e.g., iphoneos-arm64). This differentiation hasn't
  historically been needed because while macOS is a multiarch platform,
  it uses a bare darwin as PLATFORM_TRIPLE.
* Removes the use of the deprecated -Wl,-single_module flag when
  compiling macOS frameworks.
* Some whitespace normalisation where there was a mix of spaces and tabs
  in a single block.
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Sep 9, 2024
…ythonGH-117052)

Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Malcolm Smith <[email protected]>
Co-authored-by: Ned Deily <[email protected]>
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Oct 9, 2024
…st suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Oct 9, 2024
… non-macOS frameworks (python#115120)

Part of the PEP 730 work to add iOS support.

This change lays the groundwork for introducing iOS/tvOS/watchOS
frameworks; it includes the structural refactoring needed so that iOS
branches can be added into in a subsequent PR.

Summary of changes:
* Updates config.sub to the 2024-01-01 release. This is the "as
  released" version of config.sub.
* Adds a RESSRCDIR variable to allow sharing of macOS and iOS Makefile
  steps.
* Adds an INSTALLTARGETS variable so platforms can customise which
  targets are actually installed. This will be used to exclude certain
  targets (e.g., binaries, manfiles) from iOS framework installs.
* Adds a PYTHONFRAMEWORKINSTALLNAMEPREFIX variable; this is used as
  the install name for the library. This is needed to allow for iOS
  frameworks to specify an @rpath-based install name.
* Evaluates MACHDEP earlier in the configure process so that
  ac_sys_system is available.
* Modifies _PYTHON_HOST_PLATFORM evaluation for cross-platform builds
  so that the CPU architecture is differentiated from the host
  identifier. This will be used to generate a _PYTHON_HOST_PLATFORM
  definition that includes ABI information, not just CPU architecture.
* Differentiates between SOABI_PLATFORM and PLATFORM_TRIPLET.
  SOABI_PLATFORM is used in binary module names, and includes the ABI,
  but not the OS or CPU architecture (e.g.,
  math.cpython-313-iphonesimulator.dylib). PLATFORM_TRIPLET is used
  as the sys._multiarch value, and on iOS will contains the ABI and
  architecture (e.g., iphoneos-arm64). This differentiation hasn't
  historically been needed because while macOS is a multiarch platform,
  it uses a bare darwin as PLATFORM_TRIPLE.
* Removes the use of the deprecated -Wl,-single_module flag when
  compiling macOS frameworks.
* Some whitespace normalisation where there was a mix of spaces and tabs
  in a single block.
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Oct 9, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Oct 9, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Oct 9, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Oct 9, 2024
…ythonGH-117052)

Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Malcolm Smith <[email protected]>
Co-authored-by: Ned Deily <[email protected]>
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Oct 9, 2024
…117057)

Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Jacob Coffee <[email protected]>
Co-authored-by: Malcolm Smith <[email protected]>
Co-authored-by: Ned Deily <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-ios type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants