This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zach.ware
Recipients brian.curtin, sbt, terry.reedy, tim.golden, zach.ware
Date 2013-05-23.19:58:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Here's a new version of the patch, which is a major rewrite.  Among the changes:

- Switch from using 'goto' to execute the right subroutine to 'call' and end every subroutine with 'exit /B' (thank you Richard for making me aware of that possibility).  This makes the :end label useless, so it's removed.  Every subroutine now expects to start in the root of the source tree, and is expected to return there before exiting.

- Changed the argument parsing magic to a different flavor of magic.  Setting variables on the command line is now much more like it is using Unix make, no more required double quotes around the whole assignment, and you can now specify multiple targets in a single command.  This method can be quite a bit slower if you give a huge command, as it steps through the command line a character at a time (on the order of several seconds if you're appending something to PATH, for instance.  The delay is not noticeable if you're just giving targets), but at least all the magic is self-contained.

- Add '--no-externals' and '--interactive' options to configure.bat to ignore the presence or absence of the external libs and to allow questions to be asked of the user, respectively.  I've waffled back and forth on whether it is better for the '--interactive' option to be on or off by default, currently it is off.

- On 64 bit machines, default to Win32 platform if vcvarsx86_amd64.bat can't be found.

- Give some nicer output just about everywhere.  This includes making configure.bat die early in case %VS100COMNTOOLS% is not defined with a message to install MSVC++ 2010 Express, a warning if NASM is not available, and tagging all output with the name of the script.  Also, add a message at the end of building Python giving the best estimate of the outcome.

- Another part of giving a nice message at the end of building Python: if the expected executable file exists at the end, exit code 0 is returned.  This is for the buildbots, so that even if the build had errors, the tests are still run so we can see what is actually broken.  This ties in with the new '--no-externals' option on configure.bat, which would allow a buildbot to build with '--no-externals' and still be able to test everything else.

- List and use specific exit codes.  If anyone has advice on better numbers to use (more standard numbers, perhaps), please let me know :).

- Use "absolute relative" paths (paths that always start with %~dp0, but may include '..') to avoid some directory changing magic just to make a relative path point to the right place.

- 'clobber' target builds the clean target of Win32 configuration, then x64 config if the environment can be set up to do so.

- 'importlib' will clean up after itself if there wasn't a build already done.

- Some refactoring and cleanup to put things in places that make more sense and look better.  This includes major changes to :external and :tcltk to use a couple of loops to be more DRY.

- Change Tools/scripts/ (used by the test targets in make.bat and Makefile) to use instead of os.execv on win32.  Since execv creates a new process on Windows, control was handed back to the console as soon as the execv call was made, but the test output still came to the terminal so the prompt was lost in the test output and did not automatically come up at the end of the test.  Using keeps control in the parent python(_d) process and doesn't release back to the console until the test is done.

- Added better documentation of make.bat usage to PCbuild\readme.txt, and took out unrelated changes to that file (which will be posted to another issue).

Everything works as expected for me, but I do only have a 32bit machine available to me currently.  I hope to be able to test on a 64bit machine soon, but have no guarantees.  For anyone testing this, I would suggest to run the command "prompt $+%PROMPT%" before testing; this will add a "+" to the beginning of your prompt for every dir on the pushd/popd stack.  Neither configure.bat nor make.bat should ever remove dirs from that stack, and should not leave any extras when they're done (unless forcibly killed in the middle of running).
Date User Action Args
2013-05-23 19:58:32zach.waresetrecipients: + zach.ware, terry.reedy, tim.golden, brian.curtin, sbt
2013-05-23 19:58:30zach.waresetmessageid: <>
2013-05-23 19:58:30zach.warelinkissue16895 messages
2013-05-23 19:58:30zach.warecreate