Files
MINGW-packages/mingw-w64-python3/0750-builddir-fixes.patch
2018-04-16 10:51:53 +03:00

50 lines
2.3 KiB
Diff

diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in
--- Python-3.6.5-orig/Makefile.pre.in 2018-04-16 09:54:23.962241000 +0300
+++ Python-3.6.5/Makefile.pre.in 2018-04-16 09:54:30.201506400 +0300
@@ -705,20 +705,20 @@
Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile
-Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN)
+Programs/_freeze_importlib$(EXE): Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN)
$(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
.PHONY: regen-importlib
-regen-importlib: Programs/_freeze_importlib
+regen-importlib: Programs/_freeze_importlib$(EXE)
# Regenerate Python/importlib_external.h
# from Lib/importlib/_bootstrap_external.py using _freeze_importlib
- ./Programs/_freeze_importlib \
+ ./Programs/_freeze_importlib$(EXE) \
$(srcdir)/Lib/importlib/_bootstrap_external.py \
$(srcdir)/Python/importlib_external.h.new
$(UPDATE_FILE) $(srcdir)/Python/importlib_external.h $(srcdir)/Python/importlib_external.h.new
# Regenerate Python/importlib.h from Lib/importlib/_bootstrap.py
# using _freeze_importlib
- ./Programs/_freeze_importlib \
+ ./Programs/_freeze_importlib$(EXE) \
$(srcdir)/Lib/importlib/_bootstrap.py \
$(srcdir)/Python/importlib.h.new
$(UPDATE_FILE) $(srcdir)/Python/importlib.h $(srcdir)/Python/importlib.h.new
@@ -1664,7 +1664,7 @@
find build -name '*.py[co]' -exec rm -f {} ';' || true
-rm -f pybuilddir.txt
-rm -f Lib/lib2to3/*Grammar*.pickle
- -rm -f Programs/_testembed Programs/_freeze_importlib
+ -rm -f Programs/_testembed Programs/_freeze_importlib$(EXE)
-find build -type f -a ! -name '*.gc??' -exec rm -f {} ';'
-rm -f Include/pydtrace_probes.h
diff -Naur Python-3.6.5-orig/Programs/_freeze_importlib.c Python-3.6.5/Programs/_freeze_importlib.c
--- Python-3.6.5-orig/Programs/_freeze_importlib.c 2018-03-28 12:19:31.000000000 +0300
+++ Python-3.6.5/Programs/_freeze_importlib.c 2018-04-16 09:54:30.217106500 +0300
@@ -20,7 +20,7 @@
{0, 0, 0} /* sentinel */
};
-#ifndef MS_WINDOWS
+#ifndef _MSC_VER
/* On Windows, this links with the regular pythonXY.dll, so this variable comes
from frozen.obj. In the Makefile, frozen.o is not linked into this executable,
so we define the variable here. */