Skip to content

Commit 8306661

Browse files
committed
Correctly enforce min macOS version, and use dotted path for frameworks.
2 parents 52c4396 + dd3e00c commit 8306661

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

.github/workflows/release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ jobs:
3939
4040
Includes:
4141
* Python ${{ env.PY_VERSION }}.?
42-
* OpenSSL 3.0.5
42+
* OpenSSL 3.1.2
4343
* BZip2 1.0.8
44-
* XZ 5.2.6
45-
* LibFFI 3.4.2
44+
* XZ 5.4.4
45+
* LibFFI 3.4.4
4646
outputs:
4747
upload_url: ${{ steps.create_release.outputs.upload_url }}
4848

4949
build:
50-
runs-on: macOS-12
50+
runs-on: macOS-latest
5151
needs: make-release
5252
strategy:
5353
max-parallel: 4

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ CURL_FLAGS=--disable --fail --location --create-dirs --progress-bar
6565

6666
# macOS targets
6767
TARGETS-macOS=macosx.x86_64 macosx.arm64
68-
VERSION_MIN-macOS=10.15
68+
VERSION_MIN-macOS=11.0
6969
CFLAGS-macOS=-mmacosx-version-min=$(VERSION_MIN-macOS)
7070

7171
# iOS targets
@@ -847,6 +847,7 @@ $$(PYTHON_SRCDIR-$(sdk))/Makefile: \
847847
LIBLZMA_LIBS="-L$$(XZ_MERGE-$(sdk))/lib -llzma" \
848848
BZIP2_CFLAGS="-I$$(BZIP2_MERGE-$(sdk))/include" \
849849
BZIP2_LIBS="-L$$(BZIP2_MERGE-$(sdk))/lib -lbz2" \
850+
MACOSX_DEPLOYMENT_TARGET="$$(VERSION_MIN-$(os))" \
850851
--prefix="$$(PYTHON_INSTALL-$(sdk))" \
851852
--enable-ipv6 \
852853
--enable-universalsdk \

README.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ Python Apple Support
44
This is a meta-package for building a version of Python that can be embedded
55
into a macOS, iOS, tvOS or watchOS project.
66

7-
**This branch builds a packaged version of Python 3.11.5**.
7+
**This branch builds a packaged version of Python 3.11.6**.
88
Other Python versions are available by cloning other branches of the main
99
repository:
1010

1111
* `Python 3.8 <https://github.com/beeware/Python-Apple-support/tree/3.8>`__
1212
* `Python 3.9 <https://github.com/beeware/Python-Apple-support/tree/3.9>`__
1313
* `Python 3.10 <https://github.com/beeware/Python-Apple-support/tree/3.10>`__
1414
* `Python 3.12 <https://github.com/beeware/Python-Apple-support/tree/3.12>`__
15+
* `Python 3.13 <https://github.com/beeware/Python-Apple-support/tree/3.13>`__
1516

1617
It works by downloading, patching, and building a fat binary of Python and selected
1718
pre-requisites, and packaging them as static libraries that can be incorporated into an
@@ -41,10 +42,10 @@ The binaries support x86_64 and arm64 for macOS; arm64 for iOS and appleTV
4142
devices; and arm64_32 for watchOS. It also supports device simulators on both
4243
x86_64 and M1 hardware. This should enable the code to run on:
4344

44-
* macOS 10.15 (Catalina) or later, on:
45+
* macOS 11 (Big Sur) or later, on:
4546
* MacBook (including MacBooks using Apple Silicon)
4647
* iMac (including iMacs using Apple Silicon)
47-
* Mac Mini (including M1 Apple Silicon Mac minis)
48+
* Mac Mini (including Apple Silicon Mac minis)
4849
* Mac Studio (all models)
4950
* Mac Pro (all models)
5051
* iOS 12.0 or later, on:

patch/Python/Python.patch

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ index 2ce5c5b64d..6e10a0c4a5 100644
131131
import pwd
132132
os.environ['HOME'] = pwd.getpwuid(os.getuid())[5]
133133
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py
134-
index f603a89f7f..48463efcfc 100644
134+
index f603a89f7f..92af10f21a 100644
135135
--- a/Lib/importlib/_bootstrap_external.py
136136
+++ b/Lib/importlib/_bootstrap_external.py
137137
@@ -52,7 +52,7 @@
@@ -143,7 +143,7 @@ index f603a89f7f..48463efcfc 100644
143143
_CASE_INSENSITIVE_PLATFORMS = (_CASE_INSENSITIVE_PLATFORMS_BYTES_KEY
144144
+ _CASE_INSENSITIVE_PLATFORMS_STR_KEY)
145145

146-
@@ -1705,6 +1705,60 @@
146+
@@ -1705,6 +1705,59 @@
147147
return 'FileFinder({!r})'.format(self.path)
148148

149149

@@ -190,10 +190,9 @@ index f603a89f7f..48463efcfc 100644
190190
+
191191
+ def find_spec(self, fullname, path, target=None):
192192
+ name = fullname.split(".")[-1]
193-
+ framework_name = "_".join(fullname.split("."))
194193
+
195194
+ for extension in EXTENSION_SUFFIXES:
196-
+ dylib_file = _path_join(self.frameworks_path, f"{framework_name}.framework", f"{name}{extension}")
195+
+ dylib_file = _path_join(self.frameworks_path, f"{fullname}.framework", f"{name}{extension}")
197196
+ _bootstrap._verbose_message('Looking for Apple Framework dylib {}', dylib_file)
198197
+ if _path_isfile(dylib_file):
199198
+ loader = AppleFrameworkLoader(fullname, dylib_file, path)
@@ -204,7 +203,7 @@ index f603a89f7f..48463efcfc 100644
204203
# Import setup ###############################################################
205204

206205
def _fix_up_module(ns, name, pathname, cpathname=None):
207-
@@ -1752,3 +1806,7 @@
206+
@@ -1752,3 +1805,7 @@
208207
supported_loaders = _get_supported_file_loaders()
209208
sys.path_hooks.extend([FileFinder.path_hook(*supported_loaders)])
210209
sys.meta_path.append(PathFinder)

0 commit comments

Comments
 (0)