···2424 # doesn't work in Nix because Nix changes the mtime of files in
2525 # the Nix store to 1. So treat that as a special case.
2626 ./nix-store-mtime.patch
2727+2828+ # http://bugs.python.org/issue10013
2929+ ./python2.6-fix-parallel-make.patch
2730 ];
28312932 preConfigure = ''
···11+diff -up Python-2.7/Makefile.pre.in.fix-parallel-make Python-2.7/Makefile.pre.in
22+--- Python-2.7/Makefile.pre.in.fix-parallel-make 2010-07-22 15:01:39.567996932 -0400
33++++ Python-2.7/Makefile.pre.in 2010-07-22 15:47:02.437998509 -0400
44+@@ -207,6 +207,7 @@ SIGNAL_OBJS= @SIGNAL_OBJS@
55+66+ ##########################################################################
77+ # Grammar
88++GRAMMAR_STAMP= $(srcdir)/grammar-stamp
99+ GRAMMAR_H= $(srcdir)/Include/graminit.h
1010+ GRAMMAR_C= $(srcdir)/Python/graminit.c
1111+ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
1212+@@ -530,10 +531,24 @@ Modules/getpath.o: $(srcdir)/Modules/get
1313+ Modules/python.o: $(srcdir)/Modules/python.c
1414+ $(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c
1515+1616++# GNU "make" interprets rules with two dependents as two copies of the rule.
1717++#
1818++# In a parallel build this can lead to pgen being run twice, once for each of
1919++# GRAMMAR_H and GRAMMAR_C, leading to race conditions in which the compiler
2020++# reads a partially-overwritten copy of one of these files, leading to syntax
2121++# errors (or linker errors if the fragment happens to be syntactically valid C)
2222++#
2323++# See http://www.gnu.org/software/hello/manual/automake/Multiple-Outputs.html
2424++# for more information
2525++#
2626++# Introduce ".grammar-stamp" as a contrived single output from PGEN to avoid
2727++# this:
2828++$(GRAMMAR_H) $(GRAMMAR_C): $(GRAMMAR_STAMP)
2929+3030+-$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
3131++$(GRAMMAR_STAMP): $(PGEN) $(GRAMMAR_INPUT)
3232+ -@$(INSTALL) -d Include
3333+ -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
3434++ touch $(GRAMMAR_STAMP)
3535+3636+ $(PGEN): $(PGENOBJS)
3737+ $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)