Author vstinner
Recipients berker.peksag, brett.cannon, ezio.melotti, josh.r, koobs, martin.panter, ncoghlan, ned.deily, python-dev, vlee, vstinner, willingc, yan12125, zach.ware
Date 2017-05-02.23:44:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I rewrote Python (UNIX/BSD) build system to not rebuild generated files based on file modification time: the action is now explicit. This change should not only fix buildbots, but also ease cross-compilation, and more generally make Python build less painful! No more funny error when the system only provides Python 2.6 and so "make touch" doesn't work, whereas "make touch" was the obvious workaround to avoid trying to regenerated files.

The change:

My change adds a global "rebuild-all", but this command is made of multiple subcommands:
      - rebuild-ast: Include/Python-ast.h and Python/Python-ast.c
      - rebuild-grammar: Include/graminit.h and Python/graminit.c
      - rebuild-importlib: Python/importlib_external.h and Python/importlib.h
      - rebuild-opcode: Include/opcode.h
      - rebuild-opcode-targets: Python/opcode_targets.h
      - rebuild-typeslots: Objects/

rebuild-all is not needed if you only want to update AST for example: just run "make rebuild-ast && make".


As you may expect, the change is quite big for a very sensitive part of Python: the build system. Do we want to backport such major change?

Another solution for stable branches to to remove the rebuild of generated files from configure and Makefile... Just hope that we will not need it anymore? Not sure if it's a good idea. I expect fixes in importlib, so "rebuild-importlib" will be needed at least.

Even if I don't trust my own work(!), I would suggest to review carefully my change, test it on all buildbots, play with it, and then backport it to 2.7, 3.5 and 3.6.

Note: Windows is not affected by this bug, right?
Date User Action Args
2017-05-02 23:44:14vstinnersetrecipients: + vstinner, brett.cannon, ncoghlan, ned.deily, ezio.melotti, python-dev, berker.peksag, martin.panter, zach.ware, koobs, willingc, josh.r, vlee, yan12125
2017-05-02 23:44:14vstinnersetmessageid: <>
2017-05-02 23:44:14vstinnerlinkissue23404 messages
2017-05-02 23:44:13vstinnercreate