-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Description
Feature or enhancement
Proposal:
At present, the iOS XCframework is built so that it can be linked as a framework.
This works fine; however, it requires tools building for iOS to include iOS-specific branches to include framework linking arguments.
The iOS XCframework contains multiple slices (for each supported ABI); each slice contains both the Framework, and a "POSIX-like" set of bin, include and lib folders. This exists to make it easy to set include paths, and to provide the structure for stdlib resources that can be copied into the final app (since those resources cannot be placed in the Framework itself).
However the lib folder does not contain a copy of libpython*.dylib - because binary compiled content can only be distributed on iOS inside a Framework.
In the process of developing patches for PyO3 to support iOS, it became apparent that many of the complications of building iOS binary components become a lot easier if "POSIX-like" part of each XCframework slice contains a lib/libpython*.dylib that is a symlink to the actual Python framework binary. This mirrors the structure of macOS frameworks. The symlink can't be copied into the application, but it's easy to exclude that file as part of the Xcode utility scripts.
The XCframework build script should include a lib folder for each slice that contains a symlink to the Framework binary.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response