@@ -64,7 +64,6 @@ VERSION_MIN-visionOS=2.0
64
64
65
65
# The architecture of the machine doing the build
66
66
HOST_ARCH =$(shell uname -m)
67
- HOST_PYTHON =$(shell which python$(PYTHON_VER ) )
68
67
69
68
# Force the path to be minimal. This ensures that anything in the user environment
70
69
# (in particular, homebrew and user-provided Python installs) aren't inadvertently
@@ -116,6 +115,27 @@ downloads/python-$(PYTHON_PKG_VERSION)-macos11.pkg:
116
115
curl $(CURL_FLAGS ) -o $@ \
117
116
https://www.python.org/ftp/python/$(PYTHON_PKG_MICRO_VERSION ) /python-$(PYTHON_PKG_VERSION ) -macos11.pkg
118
117
118
+
119
+ # ##########################################################################
120
+ # Setup: Python as a Dependency
121
+ # ##########################################################################
122
+
123
+ # In addition, a macOS build Python for the current architecture is
124
+ # also generated here; those won't need fancy dependencies just to
125
+ # build another Python. We need this because sometimes, the patches
126
+ # are so dramatic that a Python of the same MAJOR.MINOR on our system
127
+ # is no longer applicable.
128
+ HOST_PYTHON_INSTALL =$(PROJECT_DIR ) /aux/hostpython/install
129
+ HOST_PYTHON =$(HOST_PYTHON_INSTALL ) /bin/python3.14
130
+ HOST_PYTHON_SRCDIR =$(PROJECT_DIR ) /aux/hostpython/src
131
+ $(HOST_PYTHON ) : downloads/Python-$(PYTHON_VERSION ) .tar.gz
132
+ mkdir -p $(HOST_PYTHON_INSTALL )
133
+ mkdir -p $(HOST_PYTHON_SRCDIR )
134
+ tar zxf downloads/Python-$(PYTHON_VERSION ) .tar.gz --strip-components 1 -C $(HOST_PYTHON_SRCDIR )
135
+ cd $(HOST_PYTHON_SRCDIR ) && ./configure --prefix=" $( HOST_PYTHON_INSTALL) " \
136
+ | tee -a ../python-$(PYTHON_VERSION ) .config.log && make && make install
137
+
138
+
119
139
# ##########################################################################
120
140
# Build for specified target (from $(TARGETS-*))
121
141
# ##########################################################################
@@ -291,7 +311,7 @@ $$(PYTHON_SRCDIR-$(target))/configure: \
291
311
# Touch the configure script to ensure that Make identifies it as up to date.
292
312
touch $$(PYTHON_SRCDIR-$(target ) ) /configure
293
313
294
- $$(PYTHON_SRCDIR-$(target ) ) /Makefile : \
314
+ $$(PYTHON_SRCDIR-$(target ) ) /Makefile : $( HOST_PYTHON ) \
295
315
$$(PYTHON_SRCDIR-$(target ) ) /configure
296
316
# Configure target Python
297
317
cd $$(PYTHON_SRCDIR-$(target ) ) && \
@@ -647,7 +667,7 @@ dist/Python-$(PYTHON_VER)-macOS-support.$(BUILD_NUMBER).tar.gz: \
647
667
648
668
else
649
669
650
- $$(PYTHON_XCFRAMEWORK-$(os ) ) /Info.plist : \
670
+ $$(PYTHON_XCFRAMEWORK-$(os ) ) /Info.plist : $( HOST_PYTHON ) \
651
671
$$(foreach sdk,$$(SDKS-$(os ) ) ,$$(PYTHON_STDLIB-$$(sdk ) ) /LICENSE.TXT)
652
672
@echo " >>> Create Python.XCFramework on $( os) "
653
673
mkdir -p $$(dir $$(PYTHON_XCFRAMEWORK-$(os ) ) )
0 commit comments