@@ -34,35 +34,45 @@ OPENSSL_VERSION=3.0.16-2
34
34
XZ_VERSION =5.6.4-2
35
35
36
36
# Supported OS
37
- OS_LIST =macOS iOS tvOS watchOS visionOS
37
+ OS_LIST =macOS iOS tvOS watchOS visionOS MacCatalyst
38
38
39
39
CURL_FLAGS =--disable --fail --location --create-dirs --progress-bar
40
40
41
41
# macOS targets
42
42
TARGETS-macOS =macosx.x86_64 macosx.arm64
43
43
TRIPLE_OS-macOS =macos
44
44
VERSION_MIN-macOS =11.0
45
+ CONFIGFLAGS-macOS =
45
46
46
47
# iOS targets
47
- TARGETS-iOS =iphonesimulator.x86_64 iphonesimulator.arm64 iphoneos.arm64 macabi.x86_64 macabi.arm64
48
+ TARGETS-iOS =iphonesimulator.x86_64 iphonesimulator.arm64 iphoneos.arm64
48
49
TRIPLE_OS-iOS =ios
49
50
VERSION_MIN-iOS =13.0
50
- VERSION_MIN_OVERRIDE-macabi =14.2
51
- CONFIGFLAGS-macabi=--with-catalyst-macos-version =11.2
51
+ CONFIGFLAGS-iOS =
52
52
53
53
# tvOS targets
54
54
TARGETS-tvOS =appletvsimulator.x86_64 appletvsimulator.arm64 appletvos.arm64
55
55
TRIPLE_OS-tvOS =tvos
56
56
VERSION_MIN-tvOS =12.0
57
+ CONFIGFLAGS-tvOS =
57
58
58
59
# watchOS targets
59
60
TARGETS-watchOS =watchsimulator.x86_64 watchsimulator.arm64 watchos.arm64_32
60
61
TRIPLE_OS-watchOS =watchos
61
62
VERSION_MIN-watchOS =4.0
63
+ CONFIGFLAGS-watchOS =
62
64
65
+ # visionOS targets
63
66
TARGETS-visionOS =xrsimulator.arm64 xros.arm64
64
67
TRIPLE_OS-visionOS =xros
65
68
VERSION_MIN-visionOS =2.0
69
+ CONFIGFLAGS-visionOS =
70
+
71
+ # Mac Catalyst Targets
72
+ TARGETS-MacCatalyst =macabi.x86_64 macabi.arm64
73
+ TRIPLE_OS-MacCatalyst =ios
74
+ VERSION_MIN-MacCatalyst =14.2
75
+ CONFIGFLAGS-MacCatalyst=--with-catalyst-macos-version =11.2
66
76
67
77
# The architecture of the machine doing the build
68
78
HOST_ARCH =$(shell uname -m)
@@ -138,30 +148,17 @@ BASE-$(target)=$$(basename $(target))
138
148
SDK-$(target ) =$$(subst macabi,macosx,$$(BASE-$(target ) ) )
139
149
ARCH-$(target ) =$$(subst .,,$$(suffix $(target ) ) )
140
150
141
- # Compute version minimum for the target
142
- VERSION_MIN-$(target ) =$$(VERSION_MIN-$(os ) )
143
- ifdef VERSION_MIN_OVERRIDE-$$(BASE-$(target))
144
- VERSION_MIN-$(target) =$$(VERSION_MIN_OVERRIDE-$$(BASE-$(target ) ) )
145
- endif
146
-
147
- # Inherit the basename for the configure flags.
148
- ifdef CONFIGFLAGS-$$(BASE-$(target))
149
- CONFIGFLAGS-$(target) =$$(CONFIGFLAGS-$$(BASE-$(target ) ) )
150
- else
151
- CONFIGFLAGS-$(target) =
152
- endif
153
-
154
151
ifneq ($(os ) ,macOS)
155
152
ifeq ($$(findstring simulator,$$(BASE-$(target))),)
156
153
ifeq ($$(findstring macabi,$$(BASE-$(target))),)
157
- TARGET_TRIPLE-$(target) =$$(ARCH-$(target ) ) -apple-$$(TRIPLE_OS-$(os ) )$$(VERSION_MIN-$(target ) )
154
+ TARGET_TRIPLE-$(target) =$$(ARCH-$(target ) ) -apple-$$(TRIPLE_OS-$(os ) )$$(VERSION_MIN-$(os ) )
158
155
IS_SIMULATOR-$(target) =False
159
156
else
160
- TARGET_TRIPLE-$(target) =$$(ARCH-$(target ) ) -apple-$$(TRIPLE_OS-$(os ) )$$(VERSION_MIN-$(target ) ) -macabi
157
+ TARGET_TRIPLE-$(target) =$$(ARCH-$(target ) ) -apple-$$(TRIPLE_OS-$(os ) )$$(VERSION_MIN-$(os ) ) -macabi
161
158
IS_SIMULATOR-$(target) =False
162
159
endif
163
160
else
164
- TARGET_TRIPLE-$(target) =$$(ARCH-$(target ) ) -apple-$$(TRIPLE_OS-$(os ) )$$(VERSION_MIN-$(target ) ) -simulator
161
+ TARGET_TRIPLE-$(target) =$$(ARCH-$(target ) ) -apple-$$(TRIPLE_OS-$(os ) )$$(VERSION_MIN-$(os ) ) -simulator
165
162
IS_SIMULATOR-$(target) =True
166
163
endif
167
164
endif
@@ -347,7 +344,7 @@ $$(PYTHON_SRCDIR-$(target))/Makefile: \
347
344
--with-openssl=" $$ (OPENSSL_INSTALL-$( target) )" \
348
345
--enable-framework=" $$ (PYTHON_INSTALL-$( target) )" \
349
346
--with-system-libmpdec \
350
- $$(CONFIGFLAGS-$(target ) ) \
347
+ $$(CONFIGFLAGS-$(os ) ) \
351
348
2>&1 | tee -a ../python-$(PYTHON_VERSION ) .config.log
352
349
353
350
$$(PYTHON_SRCDIR-$(target ) ) /python.exe : $$(PYTHON_SRCDIR-$(target ) ) /Makefile
@@ -386,7 +383,7 @@ $$(PYTHON_PLATFORM_SITECUSTOMIZE-$(target)):
386
383
| sed -e " s/{{platform}}/$$ (OS_LOWER-$( target) )/g" \
387
384
| sed -e " s/{{arch}}/$$ (ARCH-$( target) )/g" \
388
385
| sed -e " s/{{sdk}}/$$ (SDK-$( target) )/g" \
389
- | sed -e " s/{{version_min}}/$$ (VERSION_MIN-$( target ) )/g" \
386
+ | sed -e " s/{{version_min}}/$$ (VERSION_MIN-$( os ) )/g" \
390
387
| sed -e " s/{{is_simulator}}/$$ (IS_SIMULATOR-$( target) )/g" \
391
388
> $$(PYTHON_PLATFORM_CONFIG-$(target ) ) /_cross_$$(ARCH-$(target ) ) _$$(SDK-$(target ) ) .py
392
389
cat $(PROJECT_DIR ) /patch/Python/sitecustomize.py.tmpl \
@@ -407,8 +404,6 @@ vars-$(target):
407
404
@echo "BASE-$(target ) : $$(BASE-$(target ) ) "
408
405
@echo "SDK-$(target ) : $$(SDK-$(target ) ) "
409
406
@echo "ARCH-$(target ) : $$(ARCH-$(target ) ) "
410
- @echo "CONFIGFLAGS-$(target ) : $$(CONFIGFLAGS-$(target ) ) "
411
- @echo "VERSION_MIN-$(target ) : $$(VERSION_MIN-$(target ) ) "
412
407
@echo "TARGET_TRIPLE-$(target ) : $$(TARGET_TRIPLE-$(target ) ) "
413
408
@echo "SDK_ROOT-$(target ) : $$(SDK_ROOT-$(target ) ) "
414
409
@echo "BZIP2_INSTALL-$(target ) : $$(BZIP2_INSTALL-$(target ) ) "
0 commit comments