Skip to content

Commit b76b31f

Browse files
committed
unix: update Makefile.pre.in patch for Python 3.9
The line above the patched line changed in 3.9 and warrants yet another variant of this patch.
1 parent 7a74d90 commit b76b31f

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

cpython-unix/build-cpython.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ diff --git a/Makefile.pre.in b/Makefile.pre.in
114114
platform: $(BUILDPYTHON) pybuilddir.txt
115115
$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
116116
EOF
117-
else
117+
elif [ "${PYTHON_MAJMIN_VERSION}" = "3.8" ]; then
118118
patch -p1 <<"EOF"
119119
diff --git a/Makefile.pre.in b/Makefile.pre.in
120120
--- a/Makefile.pre.in
@@ -126,6 +126,21 @@ diff --git a/Makefile.pre.in b/Makefile.pre.in
126126
- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
127127
+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(SYSLIBS)
128128
129+
platform: $(BUILDPYTHON) pybuilddir.txt
130+
$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
131+
EOF
132+
else
133+
patch -p1 <<"EOF"
134+
diff --git a/Makefile.pre.in b/Makefile.pre.in
135+
--- a/Makefile.pre.in
136+
+++ b/Makefile.pre.in
137+
@@ -563,7 +563,7 @@ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c
138+
139+
# Build the interpreter
140+
$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS)
141+
- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
142+
+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(SYSLIBS)
143+
129144
platform: $(BUILDPYTHON) pybuilddir.txt
130145
$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
131146
EOF

0 commit comments

Comments
 (0)