Skip to content

Commit dba406c

Browse files
committed
Update patch to Python 3.10.6.
1 parent d490808 commit dba406c

File tree

3 files changed

+649
-168
lines changed

3 files changed

+649
-168
lines changed

Makefile

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ BUILD_NUMBER=custom
3939
# PYTHON_VERSION is the full version number (e.g., 3.10.0b3)
4040
# PYTHON_MICRO_VERSION is the full version number, without any alpha/beta/rc suffix. (e.g., 3.10.0)
4141
# PYTHON_VER is the major/minor version (e.g., 3.10)
42-
PYTHON_VERSION=3.10.4
42+
PYTHON_VERSION=3.10.6
4343
PYTHON_MICRO_VERSION=$(shell echo $(PYTHON_VERSION) | grep -Eo "\d+\.\d+\.\d+")
4444
PYTHON_VER=$(basename $(PYTHON_VERSION))
4545

@@ -215,9 +215,11 @@ CXX-$(target)=xcrun --sdk $$(SDK-$(target)) clang
215215
AR-$(target)=xcrun --sdk $$(SDK-$(target)) ar
216216
CFLAGS-$(target)=\
217217
-target $$(TARGET_TRIPLE-$(target)) \
218+
--sysroot=$$(SDK_ROOT-$(target)) \
218219
$$(CFLAGS-$(os))
219220
LDFLAGS-$(target)=\
220221
-target $$(TARGET_TRIPLE-$(target)) \
222+
--sysroot=$$(SDK_ROOT-$(target)) \
221223
$$(CFLAGS-$(os))
222224

223225
###########################################################################
@@ -391,22 +393,18 @@ $$(PYTHON_SRCDIR-$(target))/Makefile: \
391393
cd $$(PYTHON_SRCDIR-$(target)) && patch -p1 < $(PROJECT_DIR)/patch/Python/Python.patch
392394
# Configure target Python
393395
cd $$(PYTHON_SRCDIR-$(target)) && \
396+
PATH="$$(PYTHON_INSTALL-macosx)/bin:$(PATH)" \
394397
./configure \
395398
AR="$$(AR-$(target))" \
396399
CC="$$(CC-$(target))" \
397400
CXX="$$(CXX-$(target))" \
398-
CFLAGS="$$(CFLAGS-$(target))" \
399-
LDFLAGS="$$(LDFLAGS-$(target))" \
400-
LIBLZMA_CFLAGS="-I$$(XZ_MERGE-$$(SDK-$(target)))/include" \
401-
LIBLZMA_LIBS="-L$$(XZ_MERGE-$$(SDK-$(target)))/lib -llzma" \
402-
BZIP2_CFLAGS="-I$$(BZIP2_MERGE-$$(SDK-$(target)))/include" \
403-
BZIP2_LIBS="-L$$(BZIP2_MERGE-$$(SDK-$(target)))/lib -lbz2" \
401+
CFLAGS="$$(CFLAGS-$(target)) -I$$(BZIP2_MERGE-$$(SDK-$(target)))/include -I$$(XZ_MERGE-$$(SDK-$(target)))/include" \
402+
LDFLAGS="$$(LDFLAGS-$(target)) -L$$(BZIP2_MERGE-$$(SDK-$(target)))/lib -L$$(XZ_MERGE-$$(SDK-$(target)))/lib" \
404403
LIBFFI_INCLUDEDIR="$$(LIBFFI_MERGE-$$(SDK-$(target)))/include" \
405404
LIBFFI_LIBDIR="$$(LIBFFI_MERGE-$$(SDK-$(target)))/lib" \
406405
LIBFFI_LIB="ffi" \
407406
--host=$$(TARGET_TRIPLE-$(target)) \
408407
--build=$(HOST_ARCH)-apple-darwin \
409-
--with-build-python=$$(PYTHON_INSTALL-macosx)/bin/python$(PYTHON_VER) \
410408
--prefix="$$(PYTHON_INSTALL-$(target))" \
411409
--enable-ipv6 \
412410
--with-openssl="$$(OPENSSL_MERGE-$$(SDK-$(target)))" \
@@ -420,14 +418,16 @@ $$(PYTHON_SRCDIR-$(target))/Makefile: \
420418
$$(PYTHON_SRCDIR-$(target))/python.exe: $$(PYTHON_SRCDIR-$(target))/Makefile
421419
@echo ">>> Build Python for $(target)"
422420
cd $$(PYTHON_SRCDIR-$(target)) && \
423-
make all \
424-
2>&1 | tee -a ../python-$(PYTHON_VERSION).build.log
421+
PATH="$$(PYTHON_INSTALL-macosx)/bin:$(PATH)" \
422+
make all \
423+
2>&1 | tee -a ../python-$(PYTHON_VERSION).build.log
425424

426425
$$(PYTHON_LIB-$(target)): $$(PYTHON_SRCDIR-$(target))/python.exe
427426
@echo ">>> Install Python for $(target)"
428427
cd $$(PYTHON_SRCDIR-$(target)) && \
429-
make install \
430-
2>&1 | tee -a ../python-$(PYTHON_VERSION).install.log
428+
PATH="$$(PYTHON_INSTALL-macosx)/bin:$(PATH)" \
429+
make install \
430+
2>&1 | tee -a ../python-$(PYTHON_VERSION).install.log
431431

432432
endif
433433

@@ -606,12 +606,8 @@ $$(PYTHON_SRCDIR-$(sdk))/Makefile: \
606606
cd $$(PYTHON_SRCDIR-$(sdk)) && \
607607
./configure \
608608
CC="$$(CC-$(sdk))" \
609-
CFLAGS="$$(CFLAGS-$(sdk))" \
610-
LDFLAGS="$$(LDFLAGS-$(sdk))" \
611-
LIBLZMA_CFLAGS="-I$$(XZ_MERGE-$(sdk))/include" \
612-
LIBLZMA_LIBS="-L$$(XZ_MERGE-$(sdk))/lib -llzma" \
613-
BZIP2_CFLAGS="-I$$(BZIP2_MERGE-$(sdk))/include" \
614-
BZIP2_LIBS="-L$$(BZIP2_MERGE-$(sdk))/lib -lbz2" \
609+
CFLAGS="$$(CFLAGS-$(sdk)) -I$$(BZIP2_MERGE-$(sdk))/include -I$$(XZ_MERGE-$(sdk))/include" \
610+
LDFLAGS="$$(LDFLAGS-$(sdk)) -L$$(XZ_MERGE-$(sdk))/lib -L$$(BZIP2_MERGE-$(sdk))/lib" \
615611
--prefix="$$(PYTHON_INSTALL-$(sdk))" \
616612
--enable-ipv6 \
617613
--enable-universalsdk \

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Python Apple Support
22
====================
33

4-
**This repository branch builds a packaged version of Python 3.10.4**.
4+
**This repository branch builds a packaged version of Python 3.10.6**.
55
Other Python versions are available by cloning other branches of the main
66
repository.
77

0 commit comments

Comments
 (0)