|
| 1 | +# CPython Apple source dependencies |
| 2 | + |
| 3 | +A meta-package for building the binary packages for iOS, tvOS, watchOS, and |
| 4 | +visionOS that a CPython build requires. This includes: |
| 5 | + |
| 6 | +- BZip2 |
| 7 | +- XZ |
| 8 | +- libFFI |
| 9 | +- mpdecimal |
| 10 | +- OpenSSL 1.1 |
| 11 | +- OpenSSL 3.0 |
| 12 | + |
| 13 | +The repository works by downloading, patching, and building binaries for each |
| 14 | +SDK target and architecture that is requried. The compiled library is packed |
| 15 | +into a tarball for distribution in "installed" form - that is, the contents of |
| 16 | +the `include` and `lib` folders are included. |
| 17 | + |
| 18 | +The binaries support arm64 for iOS, appleTV and visionOS devices, and arm64_32 |
| 19 | +for watchOS. They also supports device simulators on both x86_64 and arm64 |
| 20 | +hardware, except that visionOS is officially unsupported by Apple on x86_64. |
| 21 | +This should enable the code to run on: |
| 22 | + |
| 23 | +- **iOS 13.0 or later, on**: |
| 24 | + - iPhone (6s or later) |
| 25 | + - iPad (5th gen or later) |
| 26 | + - iPad Air (all models) |
| 27 | + - iPad Mini (2 or later) |
| 28 | + - iPad Pro (all models) |
| 29 | + - iPod Touch (7th gen or later) |
| 30 | +- **macOS 11 or later, using Mac Catalyst (14.2 or later), on**: |
| 31 | + - MacBook (2015 or later) |
| 32 | + - MacBook Air (2013 or later) |
| 33 | + - MacBook Pro (Late 2013 or later) |
| 34 | + - Mac mini (2014 or later) |
| 35 | + - iMac (2014 or later) |
| 36 | + - iMac Pro (2017 or later) |
| 37 | + - Mac Pro (2013 or later) |
| 38 | + - Mac Studio |
| 39 | +- **tvOS 9.0 or later, on**: |
| 40 | + - Apple TV (4th gen or later) |
| 41 | +- **watchOS 4.0 or later, on**: |
| 42 | + - Apple Watch (4th gen or later) |
| 43 | +- **visionOS 2.0 or later, on**: |
| 44 | + - Apple Vision Pro (all models) |
| 45 | + |
| 46 | +## Quickstart |
| 47 | + |
| 48 | +**Unless you're trying to directly link against one of these libraries, you |
| 49 | +don't need to use this repository**. When you obtain a CPython build for an |
| 50 | +Apple platform, it will have already been linked using these libraries. |
| 51 | + |
| 52 | +If you *do* need to link against these libraries for some reason, you can use |
| 53 | +the pre-compiled versions that are published on the |
| 54 | +[Github releases page](https://github.com/beeware/cpython-apple-source-deps/releases). |
| 55 | +You don't need to compile them yourself. |
| 56 | + |
| 57 | +However, if you *do* need to compile your own version for some reason: |
| 58 | + |
| 59 | +- Clone this repository |
| 60 | +- Create a Python 3 virtual environment. Any supported Python 3 release should |
| 61 | + be sufficient; some tools require python3 as part of their build. |
| 62 | +- In the root directory, run: |
| 63 | + - `make` (or `make all`) to build everything. |
| 64 | + - `make iOS` to build everything for iOS. |
| 65 | + - `make BZip2` to build BZip2 for every platform |
| 66 | + - `make BZip2-iOS` to build BZip2 for iOS |
| 67 | + |
| 68 | +This should: |
| 69 | + |
| 70 | +1. Download the original source packages |
| 71 | +2. Patch them as required for compatibility with the selected OS |
| 72 | +3. Build the libraries for the selected OS and architecture |
| 73 | +4. Package a tarball containing build products. |
| 74 | + |
| 75 | +The resulting artefacts will be packaged as `.tar.gz` files in the `dist` |
| 76 | +folder. |
0 commit comments