Skip to content

Commit 5018004

Browse files
committed
Add patch for testembed on 3.13+
1 parent 5a54bcb commit 5018004

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

cpython-unix/build-cpython.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,12 @@ if [ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_10}" ]; then
146146
patch -p1 -i ${ROOT}/patch-makesetup-deduplicate-objs.patch
147147
fi
148148

149+
# testembed links against Tcl/Tk and libpython which already has Tcl/Tk leading
150+
# duplicate symbols and warnings from objc (which causes test failures).
151+
if [ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_13}" ]; then
152+
patch -p1 -i ${ROOT}/patch-make-testembed-nolink-tcltk.patch
153+
fi
154+
149155
# The default build rule for the macOS dylib doesn't pick up libraries
150156
# from modules / makesetup. So patch it accordingly.
151157
if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
diff --git a/Makefile.pre.in b/Makefile.pre.in
2+
--- a/Makefile.pre.in
3+
+++ b/Makefile.pre.in
4+
@@ -1432,6 +1432,8 @@
5+
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/build/generate_re_casefix.py $(srcdir)/Lib/re/_casefix.py
6+
7+
Programs/_testembed: Programs/_testembed.o $(LINK_PYTHON_DEPS)
8+
+ $(eval MODLIBS := $(subst -Xlinker -hidden-ltcl8.6, , $(MODLIBS)))
9+
+ $(eval MODLIBS := $(subst -Xlinker -hidden-ltk8.6, , $(MODLIBS)))
10+
$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS)

0 commit comments

Comments
 (0)