--- Python-3.6.2rc1/Makefile.pre.in.orig 2017-06-18 14:44:47.870383000 +0200 +++ Python-3.6.2rc1/Makefile.pre.in 2017-06-18 14:47:43.823492600 +0200 @@ -695,19 +695,19 @@ 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 # 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 @@ -1631,7 +1631,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.5.2-orig/Programs/_freeze_importlib.c Python-3.5.2/Programs/_freeze_importlib.c --- Python-3.5.2-orig/Programs/_freeze_importlib.c 2016-06-26 00:38:38.000000000 +0300 +++ Python-3.5.2/Programs/_freeze_importlib.c 2016-07-12 14:22:31.403800700 +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. */