msg158944 - (view) |
Author: Brett Cannon (brett.cannon) *  |
Date: 2012-04-22 01:52 |
A shell or Python script should be used to verify that importlib.h actually needs to be rebuilt, and if so make sure that it's even possible (since it depends on a locally built ./python). |
|
|
msg158965 - (view) |
Author: Brett Cannon (brett.cannon) *  |
Date: 2012-04-22 15:01 |
The thing should also do a sanity check on the syntax so as to minimize the chances of freezing code that has no chance of working. |
|
|
msg158969 - (view) |
Author: Martin v. Löwis (loewis) *  |
Date: 2012-04-22 16:43 |
What do you mean by "sanity check on the syntax"? The current Makefile rule to build importlib.h already checks the syntax of _bootstrap.py, and fails if there is a syntax error. |
|
|
msg158970 - (view) |
Author: Brett Cannon (brett.cannon) *  |
Date: 2012-04-22 17:02 |
On Sun, Apr 22, 2012 at 12:43, Martin v. Löwis <report@bugs.python.org>wrote: > > Martin v. Löwis <martin@v.loewis.de> added the comment: > > What do you mean by "sanity check on the syntax"? The current Makefile > rule to build importlib.h already checks the syntax of _bootstrap.py, and > fails if there is a syntax error That's true, so ignore my comment. =) |
|
|
msg158972 - (view) |
Author: Martin v. Löwis (loewis) *  |
Date: 2012-04-22 17:10 |
Also, what's the issue with a shell script? The current Makefile will rebuild importlib.h if its time stamp is older than the one of _bootstrap.py. That will fail if ./python was not build. So what is the problem to solve? |
|
|
msg158977 - (view) |
Author: Brett Cannon (brett.cannon) *  |
Date: 2012-04-22 17:49 |
I don't quite follow. I have no issue with a shell script verifying things by doing an `hg status` to verify certain truths (or something). I said a shell *or* Python script to begin with. |
|
|
msg158991 - (view) |
Author: Martin v. Löwis (loewis) *  |
Date: 2012-04-22 22:25 |
My point is: ISTM that everything is already as it should be, I can see no problem in the status quo. If there is a problem, can you please rephrase it? If you want a shell script just to have one, here is one #!/bin/sh make Python/importlib.h |
|
|
msg158992 - (view) |
Author: Brett Cannon (brett.cannon) *  |
Date: 2012-04-22 22:46 |
No, I don't want a shell script just to have one. =) The status quo seems to work, but people like Georg think it's partially luck that it does and if hg changes its semantics that will cause us trouble. |
|
|
msg159261 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2012-04-25 08:54 |
New changeset acfdf46b8de1 by Marc-Andre Lemburg in branch 'default': Issue #14605 and #14642: http://hg.python.org/cpython/rev/acfdf46b8de1 |
|
|
msg159294 - (view) |
Author: Brett Cannon (brett.cannon) *  |
Date: 2012-04-25 15:03 |
This is where a script could help with printing out a warning if the built Python interpreter is not available. |
|
|
msg159309 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2012-04-25 15:56 |
> The status quo seems to work, but people like Georg think it's partially luck that > it does and if hg changes its semantics that will cause us trouble. Could you expand on that? |
|
|
msg159315 - (view) |
Author: Brett Cannon (brett.cannon) *  |
Date: 2012-04-25 16:30 |
When you do a fresh checkout, Python/importlib.h comes after Lib/importlib/_bootstrap.py and Python/freeze_importlib.py in a lexicographical sort which leads to it have a newer timestamp and thus not triggering a new build of the file. This is why Martin suggested at some point using hg status or something from a script to properly detect if something has changed that would warrant rebuilding. |
|
|
msg159326 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2012-04-25 17:45 |
New changeset 5fea362b92fc by Marc-Andre Lemburg in branch 'default': Issue #14605 and #14642: Issue a warning in case Python\importlib.h needs to http://hg.python.org/cpython/rev/5fea362b92fc |
|
|
msg159332 - (view) |
Author: Martin v. Löwis (loewis) *  |
Date: 2012-04-25 18:39 |
I'm working on a "hg touch" extension which is able to bring the time stamps back in correct order after a checkout. One would either do "make touch" after an update, or register that extension as a post-update action in .hg/hgrc. It will be controlled by a versioned .hgtouch file, that uses make(1) dependency syntax. |
|
|
msg159456 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2012-04-27 14:10 |
New changeset b3d3f3238c13 by Martin v. Loewis in branch 'default': Issue #14642: Add "hg touch" extension, and "make touch" target. http://hg.python.org/cpython/rev/b3d3f3238c13 |
|
|
msg159493 - (view) |
Author: Brett Cannon (brett.cannon) *  |
Date: 2012-04-27 20:50 |
Can this issue be closed, Martin, thanks to your extension? |
|
|
msg159515 - (view) |
Author: Martin v. Löwis (loewis) *  |
Date: 2012-04-28 09:57 |
As I don't fully understand what the original issue was, I can't know for sure whether it's fixed now. But yes, there is now a mechanism to bring the time stamps in the right order. |
|
|