<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body><div><div style="font-family: Calibri,sans-serif; font-size: 11pt;">Simply removing them would break the Windows build, and it may not be easily fixable as the dependency system we use doesn't allow building a project twice. <br><br>Currently we fail the build if a generated file changes and then the user has to trigger a second build with the new file, but typically they're fine and the first build succeeds.<br><br>Cheers,<br>Steve<br><br>Top-posted from my Windows Phone</div></div><div dir="ltr"><hr><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">From: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;"><a href="mailto:vadmium+py@gmail.com">Martin Panter</a></span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">Sent: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;">‎3/‎13/‎2016 19:43</span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">To: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;"><a href="mailto:russell@keith-magee.com">Russell Keith-Magee</a>; <a href="mailto:python-dev@python.org">python-dev</a></span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">Cc: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;"><a href="mailto:antoine@python.org">antoine@python.org</a></span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">Subject: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;">Re: [Python-Dev] Bug in build system for cross-platform builds</span><br><br></div>On 13 March 2016 at 01:13, Russell Keith-Magee <russell@keith-magee.com> wrote:<br>> The patches that I've uploaded to Issue23670 [1] show a full cross-platform<br>> [1] http://bugs.python.org/issue23670<br>> build process. After you apply that patch, the iOS directory contains a<br>> meta-Makefile that manages the build process.<br><br>Thanks very much for pointing that out. This has helped me understand<br>a lot more things. Only now do I realize that the four files generated<br>by pgen and _freeze_importlib are actually already committed into the<br>Mercurial repository:<br><br>Include/graminit.h<br>Python/graminit.c<br>Python/importlib.h<br>Python/importlib_external.h<br><br>A question for other Python developers: Why are these generated files<br>stored in the repository? The graminit ones seem to have been there<br>since forever (1990). It seems the importlib ones were there due to a<br>bootstrapping problem, but now that is solved. Antoine<br><https://bugs.python.org/issue14928#msg163048> said he kept them in<br>the repository on purpose, but I want to know why.<br><br>If we ignore the cross compiling use case, would there be any other<br>consequences of removing these generated files from the repository?<br>E.g. would it affect the Windows build process?<br><br>I have two possible solutions in mind: either remove the generated<br>files from the repository and always build them, or keep them but do<br>not automatically regenerate them every build. Since they are<br>generated files, not source files, I would prefer to remove them, but<br>I want to know the consequences first.<br><br>> On Sat, Mar 12, 2016 at 8:48 AM, Martin Panter <vadmium+py@gmail.com> wrote:<br>>> On 11 March 2016 at 23:16, Russell Keith-Magee <russell@keith-magee.com><br>>> wrote:<br>>> ><br>>> > On Sat, Mar 12, 2016 at 6:38 AM, Martin Panter <vadmium+py@gmail.com><br>>> > wrote:<br>>> >> I don't understand. After I run Make, it looks like I get working<br>>> >> executables leftover at Programs/_freeze_importlib and Parser/pgen. Do<br>>> >> you mean to install these programs with "make install" or something?<br>>> ><br>>> ><br>>> > Making them part of the installable artefacts would be one option, but<br>>> > they<br>>> > don't have to be installed, just preserved.<br>>><br>>> What commands are you running that cause them to not be preserved at<br>>> the end of the build?<br>><br>><br>> I don't know - this is where I hit the end of my understanding of the build<br>> process. All I know for certain is that 3.4.2 doesn't have this problem;<br>> 3.5.1 does, and Issue22359 (fixed in [3]) is the source of the problem. A<br>> subsequent fix [4] introduced an additional problem with _freeze_importlib.<br>><br>> [3] https://hg.python.org/cpython/rev/565b96093ec8<br>> [4] https://hg.python.org/cpython/rev/02e3bf65b2f8<br><br>After my realization about the generated files, I think I can solve<br>this one. Before the changes you identified, the build process<br>probably thought the generated files were up to date, so it didn't<br>need to cross-compile pgen or _freeze_importlib. If the generated file<br>timestamps were out of date (e.g. depending on the order they are<br>checked out or extracted), the first native build stage would have<br>fixed them up.<br>_______________________________________________<br>Python-Dev mailing list<br>Python-Dev@python.org<br>https://mail.python.org/mailman/listinfo/python-dev<br>Unsubscribe: https://mail.python.org/mailman/options/python-dev/steve.dower%40python.org<br></body></html>