Files
MINGW-packages/mingw-w64-python3/0750-builddir-fixes.patch
2018-12-25 08:58:30 +03:00

50 lines
2.4 KiB
Diff

diff -Naur Python-3.7.0-orig/Makefile.pre.in Python-3.7.0/Makefile.pre.in
--- Python-3.7.0-orig/Makefile.pre.in 2018-07-12 10:22:05.442031000 +0300
+++ Python-3.7.0/Makefile.pre.in 2018-07-12 10:22:10.636840100 +0300
@@ -724,20 +724,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_CORE_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
@@ -1696,7 +1696,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
-rm -f profile-gen-stamp
diff -Naur Python-3.7.0-orig/Programs/_freeze_importlib.c Python-3.7.0/Programs/_freeze_importlib.c
--- Python-3.7.0-orig/Programs/_freeze_importlib.c 2018-06-27 06:07:35.000000000 +0300
+++ Python-3.7.0/Programs/_freeze_importlib.c 2018-07-12 10:22:10.636840100 +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. */