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

Initial iOS support #2102

Merged
merged 2 commits into from
Jun 6, 2024
Merged

Initial iOS support #2102

merged 2 commits into from
Jun 6, 2024

Conversation

FeodorFitsner
Copy link
Contributor

This PR adds minimal iOS support to Maturin.

Related issue: #1742

Solution is merely based on #1742 by @holzschu

It works! I've been able to build pydantic-core package for iOS and simulator using crossenv.

The only issue is wheel tag which is always -cp312-cp312-ios_23_5_0_arm64.whl for all three triples passed to CARGO_BUILD_TARGET:

  • aarch64-apple-ios
  • aarch64-apple-ios-sim
  • x86_64-apple-ios

though binaries inside .whl have correct architecture.

_PYTHON_HOST_PLATFORM is also set, but is not respected.

I'd like to improve that in this PR as well (if that's possible), but don't know where to dig. Some hint/guidance would be appreciated.

Copy link

netlify bot commented Jun 5, 2024

Deploy Preview for maturin-guide ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit c490515
🔍 Latest deploy log https://app.netlify.com/sites/maturin-guide/deploys/6660f43e5c7c9400088d3ddd
😎 Deploy Preview https://deploy-preview-2102--maturin-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@messense messense marked this pull request as ready for review June 6, 2024 01:22
Copy link
Member

@messense messense left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I think we can merge this now and improve it in future PRs.

@messense
Copy link
Member

messense commented Jun 6, 2024

The only issue is wheel tag which is always -cp312-cp312-ios_23_5_0_arm64.whl

What are the correct wheel tags?

Edit: https://peps.python.org/pep-0730/#packaging

@messense messense changed the title iOS support Initial iOS support Jun 6, 2024
@messense messense merged commit 152a92e into PyO3:main Jun 6, 2024
28 checks passed
@messense messense mentioned this pull request Jun 6, 2024
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Jul 19, 2024
## [1.7.0] - 2024-07-07

* Initial iOS support in [#2101](PyO3/maturin#2102)
* Remove old import hook in [#2105](PyO3/maturin#2105), use [maturin-import-hook](https://github.com/PyO3/maturin-import-hook) instead
* Bump MSRV to 1.74.0 in [#2108](PyO3/maturin#2108)
* Add support for overriding wheel tag with `_PYTHON_HOST_PLATFORM` in [#2122](PyO3/maturin#2122)
* Don't add files to an archive more than once [#2125](PyO3/maturin#2125)
* Only use base python executable when `MATURIN_PEP517_USE_BASE_PYTHON` is set in [#2134](PyO3/maturin#2134)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants