Running Python from the source repo

Zachary Ware zachary.ware+pylist at gmail.com
Mon Aug 8 17:16:32 EDT 2016


On Mon, Aug 8, 2016 at 2:25 PM, Terry Reedy <tjreedy at udel.edu> wrote:
> Last January, I wrote a batch file to build all three versions with the
> 'optional' extensions.  I started rebuilding more often after this.
>
> 36\pcbuild\build.bat -e -d
> 35\pcbuild\build.bat -e -d
> 27\pcbuild\build.bat -e -d
>
> Thanks for making this possible.  It initially worked, but now it stops
> after the first command, even without errors.  Has a flag been changed to
> treat warnings as errors?  How can I change the .bat to wrap each command
> with the equivalent of try: except: pass?

I'm not sure why that would have stopped working, but the way to use a
.bat from a .bat is to 'call' it:

call 36\PCbuild\build.bat -e -d

.bat scripts don't care about the exit codes of what they run, errors
must be explicitly checked and 'exit' called if you want the script to
die early.  Try this for an unconditional build on all three branches,
with a report at the end if any of them failed:

call 36\PCbuild\build.bat -e -d
set rc36=%ERRORLEVEL%

call 35\PCbuild\build.bat -e -d
set rc35=%ERRORLEVEL%

call 27\PCbuild\build.bat -e -d
set rc27=%ERRORLEVEL%

@if %rc36% NEQ 0 (
    echo 3.6 build failed, rc: %rc36%
)
@if %rc35% NEQ 0 (
    echo 3.5 build failed, rc: %rc35%
)
@if %rc27% NEQ 0 (
    echo 2.7 build failed, rc: %rc27%
)


-- 
Zach



More information about the Python-list mailing list