beeware / Python-Apple-support

A meta-package for building a version of Python that can be embedded into a macOS, iOS, tvOS or watchOS project.
MIT License
1.11k stars 160 forks source link

Any plan for supporting xcframework? #120

Closed WeZZard closed 2 years ago

WeZZard commented 3 years ago

Current build product cannot be used in Xcode 12.5 because it requires xcframework to enclose binaries with different targets (device and simulator). Is there any plan for supporting xcframework?

freakboy3742 commented 3 years ago

This is the first I've heard of xcframework - but if it's a new requirement for Xcode, then we'll have to support it. I haven't done any investigation on what is required, though, so I can't comment on how long it will take.

WeZZard commented 3 years ago

I tried manually using command like

arch -x86_64 xcrun xcodebuild -create-xcframework \
    -library ./iphone/libFFI/libFFI.a -headers ./iphone/libFFI/Headers \
    -library ./simulator/libFFI/libFFI.a -headers ./simulator/libFFI/Headers \
    -output libFFI.xcframework

to generate xcframework and the output works correctly.

I hope this may help you to add an official support to this repo.

quangpq commented 2 years ago

I make it work for iOS only, you can check it here: https://github.com/quangpq/Python-Apple-support/commit/b40061662382f75c580e4c4feb35d3d37beb0590