[issue27641] Do not build Programs/_freeze_importlib when cross-compiling

Martin Panter report at bugs.python.org
Fri Jul 29 01:54:55 EDT 2016


Martin Panter added the comment:

Here is another possible option. It is still a bit of a hack, because the configure script inserts comments into the makefile, but this is already done e.g. with @EXPORT_MACOSX_DEPLOYMENT_TARGET at . The advantage is we get to keep the filenames of the dependencies in the makefile, so it should be easier to read and maintain. And we get to eliminate the $(cross_compiling) check as well.

In native compiling mode, everything should be as normal. When cross-compiling, the rules for regenerating files should read like

Python/importlib.h: # $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib
	./Programs/_freeze_importlib \
	    $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h

Since the Python/importlib.h should already exist, the rule in this form (dependencies commented out) won’t be run, and Make won’t need to build Programs/_freeze_importlib either.

----------
stage:  -> patch review
versions: +Python 3.5
Added file: http://bugs.python.org/file43933/comment-out-regen.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27641>
_______________________________________


More information about the Python-bugs-list mailing list