Commit 6b6e6877 authored by Zachary Ware's avatar Zachary Ware Committed by GitHub

bpo-27425: Be more explicit in .gitattributes (GH-840)

Updates checked-in line endings on several files.
parent 29fda8db
# Binary data types
*.aif binary
*.aifc binary
*.aiff binary
*.au binary
*.bmp binary
*.exe binary
*.icns binary
*.gif binary
*.ico binary
*.jpg binary
*.pck binary
Lib/test/cjkencodings/* binary
Lib/test/decimaltestdata/*.decTest binary
*.png binary
*.psd binary
*.tar binary
*.wav binary
*.whl binary
*.zip binary
# Specific binary files
Lib/test/sndhdrdata/sndhdr.* binary
Lib/test/test_email/data/msg_26.txt binary
Lib/test/xmltestdata/* binary
Lib/venv/scripts/nt/* binary
Lib/test/coding20731.py binary
# Text files that should not be subject to eol conversion
Lib/test/cjkencodings/* -text
Lib/test/decimaltestdata/*.decTest -text
Lib/test/test_email/data/*.txt -text
Lib/test/xmltestdata/* -text
Lib/test/coding20731.py -text
# Special files in third party code
Modules/zlib/zlib.map -text
# CRLF files
*.bat text eol=crlf
*.ps1 text eol=crlf
*.sln text eol=crlf
*.vcxproj* text eol=crlf
*.props text eol=crlf
*.proj text eol=crlf
PCbuild/readme.txt text eol=crlf
PC/readme.txt text eol=crlf
function global:deactivate ([switch]$NonDestructive) {
# Revert to original values
if (Test-Path function:_OLD_VIRTUAL_PROMPT) {
copy-item function:_OLD_VIRTUAL_PROMPT function:prompt
remove-item function:_OLD_VIRTUAL_PROMPT
}
if (Test-Path env:_OLD_VIRTUAL_PYTHONHOME) {
copy-item env:_OLD_VIRTUAL_PYTHONHOME env:PYTHONHOME
remove-item env:_OLD_VIRTUAL_PYTHONHOME
}
if (Test-Path env:_OLD_VIRTUAL_PATH) {
copy-item env:_OLD_VIRTUAL_PATH env:PATH
remove-item env:_OLD_VIRTUAL_PATH
}
if (Test-Path env:VIRTUAL_ENV) {
remove-item env:VIRTUAL_ENV
}
if (!$NonDestructive) {
# Self destruct!
remove-item function:deactivate
}
}
deactivate -nondestructive
$env:VIRTUAL_ENV="__VENV_DIR__"
if (! $env:VIRTUAL_ENV_DISABLE_PROMPT) {
# Set the prompt to include the env name
# Make sure _OLD_VIRTUAL_PROMPT is global
function global:_OLD_VIRTUAL_PROMPT {""}
copy-item function:prompt function:_OLD_VIRTUAL_PROMPT
function global:prompt {
Write-Host -NoNewline -ForegroundColor Green '__VENV_PROMPT__'
_OLD_VIRTUAL_PROMPT
}
}
# Clear PYTHONHOME
if (Test-Path env:PYTHONHOME) {
copy-item env:PYTHONHOME env:_OLD_VIRTUAL_PYTHONHOME
remove-item env:PYTHONHOME
}
# Add the venv to the PATH
copy-item env:PATH env:_OLD_VIRTUAL_PATH
$env:PATH = "$env:VIRTUAL_ENV\__VENV_BIN_NAME__;$env:PATH"
function global:deactivate ([switch]$NonDestructive) {
# Revert to original values
if (Test-Path function:_OLD_VIRTUAL_PROMPT) {
copy-item function:_OLD_VIRTUAL_PROMPT function:prompt
remove-item function:_OLD_VIRTUAL_PROMPT
}
if (Test-Path env:_OLD_VIRTUAL_PYTHONHOME) {
copy-item env:_OLD_VIRTUAL_PYTHONHOME env:PYTHONHOME
remove-item env:_OLD_VIRTUAL_PYTHONHOME
}
if (Test-Path env:_OLD_VIRTUAL_PATH) {
copy-item env:_OLD_VIRTUAL_PATH env:PATH
remove-item env:_OLD_VIRTUAL_PATH
}
if (Test-Path env:VIRTUAL_ENV) {
remove-item env:VIRTUAL_ENV
}
if (!$NonDestructive) {
# Self destruct!
remove-item function:deactivate
}
}
deactivate -nondestructive
$env:VIRTUAL_ENV="__VENV_DIR__"
if (! $env:VIRTUAL_ENV_DISABLE_PROMPT) {
# Set the prompt to include the env name
# Make sure _OLD_VIRTUAL_PROMPT is global
function global:_OLD_VIRTUAL_PROMPT {""}
copy-item function:prompt function:_OLD_VIRTUAL_PROMPT
function global:prompt {
Write-Host -NoNewline -ForegroundColor Green '__VENV_PROMPT__'
_OLD_VIRTUAL_PROMPT
}
}
# Clear PYTHONHOME
if (Test-Path env:PYTHONHOME) {
copy-item env:PYTHONHOME env:_OLD_VIRTUAL_PYTHONHOME
remove-item env:PYTHONHOME
}
# Add the venv to the PATH
copy-item env:PATH env:_OLD_VIRTUAL_PATH
$env:PATH = "$env:VIRTUAL_ENV\__VENV_BIN_NAME__;$env:PATH"
@echo off
set "VIRTUAL_ENV=__VENV_DIR__"
if not defined PROMPT (
set "PROMPT=$P$G"
)
if defined _OLD_VIRTUAL_PROMPT (
set "PROMPT=%_OLD_VIRTUAL_PROMPT%"
)
if defined _OLD_VIRTUAL_PYTHONHOME (
set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%"
)
set "_OLD_VIRTUAL_PROMPT=%PROMPT%"
set "PROMPT=__VENV_PROMPT__%PROMPT%"
if defined PYTHONHOME (
set "_OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%"
set PYTHONHOME=
)
if defined _OLD_VIRTUAL_PATH (
set "PATH=%_OLD_VIRTUAL_PATH%"
) else (
set "_OLD_VIRTUAL_PATH=%PATH%"
)
set "PATH=%VIRTUAL_ENV%\__VENV_BIN_NAME__;%PATH%"
:END
@echo off
set "VIRTUAL_ENV=__VENV_DIR__"
if not defined PROMPT (
set "PROMPT=$P$G"
)
if defined _OLD_VIRTUAL_PROMPT (
set "PROMPT=%_OLD_VIRTUAL_PROMPT%"
)
if defined _OLD_VIRTUAL_PYTHONHOME (
set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%"
)
set "_OLD_VIRTUAL_PROMPT=%PROMPT%"
set "PROMPT=__VENV_PROMPT__%PROMPT%"
if defined PYTHONHOME (
set "_OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%"
set PYTHONHOME=
)
if defined _OLD_VIRTUAL_PATH (
set "PATH=%_OLD_VIRTUAL_PATH%"
) else (
set "_OLD_VIRTUAL_PATH=%PATH%"
)
set "PATH=%VIRTUAL_ENV%\__VENV_BIN_NAME__;%PATH%"
:END
@echo off
if defined _OLD_VIRTUAL_PROMPT (
set "PROMPT=%_OLD_VIRTUAL_PROMPT%"
)
set _OLD_VIRTUAL_PROMPT=
if defined _OLD_VIRTUAL_PYTHONHOME (
set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%"
set _OLD_VIRTUAL_PYTHONHOME=
)
if defined _OLD_VIRTUAL_PATH (
set "PATH=%_OLD_VIRTUAL_PATH%"
)
set _OLD_VIRTUAL_PATH=
set VIRTUAL_ENV=
:END
@echo off
if defined _OLD_VIRTUAL_PROMPT (
set "PROMPT=%_OLD_VIRTUAL_PROMPT%"
)
set _OLD_VIRTUAL_PROMPT=
if defined _OLD_VIRTUAL_PYTHONHOME (
set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%"
set _OLD_VIRTUAL_PYTHONHOME=
)
if defined _OLD_VIRTUAL_PATH (
set "PATH=%_OLD_VIRTUAL_PATH%"
)
set _OLD_VIRTUAL_PATH=
set VIRTUAL_ENV=
:END
@ECHO OFF
rem Test all machine configurations, pydebug, refleaks, release build.
cd ..\..\..\
echo.
echo # ======================================================================
echo # Building Python
echo # ======================================================================
echo.
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x64
msbuild /noconsolelogger /target:clean PCbuild\pcbuild.sln /p:Configuration=Release /p:PlatformTarget=x64
msbuild /noconsolelogger /target:clean PCbuild\pcbuild.sln /p:Configuration=Debug /p:PlatformTarget=x64
msbuild /noconsolelogger PCbuild\pcbuild.sln /p:Configuration=Release /p:Platform=x64
msbuild /noconsolelogger PCbuild\pcbuild.sln /p:Configuration=Debug /p:Platform=x64
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86
msbuild /noconsolelogger PCbuild\pcbuild.sln /p:Configuration=Release /p:Platform=Win32
msbuild /noconsolelogger PCbuild\pcbuild.sln /p:Configuration=Debug /p:Platform=Win32
echo.
echo.
echo.
echo # ======================================================================
echo # test_decimal: platform=x64
echo # ======================================================================
echo.
cd PCbuild\amd64
echo # ==================== refleak tests =======================
echo.
python_d.exe -m test -uall -R 2:2 test_decimal
echo.
echo.
echo # ==================== regular tests =======================
echo.
python.exe -m test -uall test_decimal
echo.
echo.
cd ..
echo.
echo # ======================================================================
echo # test_decimal: platform=x86
echo # ======================================================================
echo.
echo # ==================== refleak tests =======================
echo.
python_d.exe -m test -uall -R 2:2 test_decimal
echo.
echo.
echo # ==================== regular tests =======================
echo.
python.exe -m test -uall test_decimal
echo.
echo.
cd amd64
echo.
echo # ======================================================================
echo # deccheck: platform=x64
echo # ======================================================================
echo.
echo # ==================== debug build =======================
echo.
python_d.exe ..\..\Modules\_decimal\tests\deccheck.py
echo.
echo.
echo # =================== release build ======================
echo.
python.exe ..\..\Modules\_decimal\tests\deccheck.py
echo.
echo.
cd ..
echo.
echo # ======================================================================
echo # deccheck: platform=x86
echo # ======================================================================
echo.
echo.
echo # ==================== debug build =======================
echo.
python_d.exe ..\Modules\_decimal\tests\deccheck.py
echo.
echo.
echo # =================== release build ======================
echo.
python.exe ..\Modules\_decimal\tests\deccheck.py
echo.
echo.
cd ..\Modules\_decimal\tests
@ECHO OFF
rem Test all machine configurations, pydebug, refleaks, release build.
cd ..\..\..\
echo.
echo # ======================================================================
echo # Building Python
echo # ======================================================================
echo.
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x64
msbuild /noconsolelogger /target:clean PCbuild\pcbuild.sln /p:Configuration=Release /p:PlatformTarget=x64
msbuild /noconsolelogger /target:clean PCbuild\pcbuild.sln /p:Configuration=Debug /p:PlatformTarget=x64
msbuild /noconsolelogger PCbuild\pcbuild.sln /p:Configuration=Release /p:Platform=x64
msbuild /noconsolelogger PCbuild\pcbuild.sln /p:Configuration=Debug /p:Platform=x64
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86
msbuild /noconsolelogger PCbuild\pcbuild.sln /p:Configuration=Release /p:Platform=Win32
msbuild /noconsolelogger PCbuild\pcbuild.sln /p:Configuration=Debug /p:Platform=Win32
echo.
echo.
echo.
echo # ======================================================================
echo # test_decimal: platform=x64
echo # ======================================================================
echo.
cd PCbuild\amd64
echo # ==================== refleak tests =======================
echo.
python_d.exe -m test -uall -R 2:2 test_decimal
echo.
echo.
echo # ==================== regular tests =======================
echo.
python.exe -m test -uall test_decimal
echo.
echo.
cd ..
echo.
echo # ======================================================================
echo # test_decimal: platform=x86
echo # ======================================================================
echo.
echo # ==================== refleak tests =======================
echo.
python_d.exe -m test -uall -R 2:2 test_decimal
echo.
echo.
echo # ==================== regular tests =======================
echo.
python.exe -m test -uall test_decimal
echo.
echo.
cd amd64
echo.
echo # ======================================================================
echo # deccheck: platform=x64
echo # ======================================================================
echo.
echo # ==================== debug build =======================
echo.
python_d.exe ..\..\Modules\_decimal\tests\deccheck.py
echo.
echo.
echo # =================== release build ======================
echo.
python.exe ..\..\Modules\_decimal\tests\deccheck.py
echo.
echo.
cd ..
echo.
echo # ======================================================================
echo # deccheck: platform=x86
echo # ======================================================================
echo.
echo.
echo # ==================== debug build =======================
echo.
python_d.exe ..\Modules\_decimal\tests\deccheck.py
echo.
echo.
echo # =================== release build ======================
echo.
python.exe ..\Modules\_decimal\tests\deccheck.py
echo.
echo.
cd ..\Modules\_decimal\tests
@echo off
setlocal
set D=%~dp0
set PCBUILD=%~dp0..\..\PCBuild\
echo Building Lib\distutils\command\wininst-xx.0.exe
call "%PCBUILD%env.bat" x86
if errorlevel 1 goto :eof
msbuild "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=Win32
if errorlevel 1 goto :eof
echo Building Lib\distutils\command\wininst-xx.0-amd64.exe
call "%PCBUILD%env.bat" x86_amd64
if errorlevel 1 goto :eof
msbuild "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=x64
@echo off
setlocal
set D=%~dp0
set PCBUILD=%~dp0..\..\PCBuild\
echo Building Lib\distutils\command\wininst-xx.0.exe
call "%PCBUILD%env.bat" x86
if errorlevel 1 goto :eof
msbuild "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=Win32
if errorlevel 1 goto :eof
echo Building Lib\distutils\command\wininst-xx.0-amd64.exe
call "%PCBUILD%env.bat" x86_amd64
if errorlevel 1 goto :eof
msbuild "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=x64
This diff is collapsed.
@%comspec% /k env.bat %*
@%comspec% /k env.bat %*
@echo off
rem A batch program to clean a particular configuration,
rem just for convenience.
call %~dp0build.bat -t Clean %*
@echo off
rem A batch program to clean a particular configuration,
rem just for convenience.
call %~dp0build.bat -t Clean %*
@echo off
rem This script adds the latest available tools to the path for the current
rem command window. However, most builds of Python will ignore the version
rem of the tools on PATH and use PlatformToolset instead. Ideally, both sets of
rem tools should be the same version to avoid potential conflicts.
rem
rem To build Python with an earlier toolset, pass "/p:PlatformToolset=v100" (or
rem 'v110', 'v120' or 'v140') to the build script.
echo Build environments: x86, amd64, x86_amd64
echo.
set VSTOOLS=%VS140COMNTOOLS%
if "%VSTOOLS%"=="" set VSTOOLS=%VS120COMNTOOLS%
if "%VSTOOLS%"=="" set VSTOOLS=%VS110COMNTOOLS%
if "%VSTOOLS%"=="" set VSTOOLS=%VS100COMNTOOLS%
call "%VSTOOLS%..\..\VC\vcvarsall.bat" %*
@echo off
rem This script adds the latest available tools to the path for the current
rem command window. However, most builds of Python will ignore the version
rem of the tools on PATH and use PlatformToolset instead. Ideally, both sets of
rem tools should be the same version to avoid potential conflicts.
rem
rem To build Python with an earlier toolset, pass "/p:PlatformToolset=v100" (or
rem 'v110', 'v120' or 'v140') to the build script.
echo Build environments: x86, amd64, x86_amd64
echo.
set VSTOOLS=%VS140COMNTOOLS%
if "%VSTOOLS%"=="" set VSTOOLS=%VS120COMNTOOLS%
if "%VSTOOLS%"=="" set VSTOOLS=%VS110COMNTOOLS%
if "%VSTOOLS%"=="" set VSTOOLS=%VS100COMNTOOLS%
call "%VSTOOLS%..\..\VC\vcvarsall.bat" %*
@echo off
setlocal
rem Simple script to fetch source for external libraries
if not exist "%~dp0..\externals" mkdir "%~dp0..\externals"
pushd "%~dp0..\externals"
if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/
rem Optionally clean up first. Be warned that this can be very destructive!
if not "%1"=="" (
for %%c in (-c --clean --clean-only) do (
if "%1"=="%%c" goto clean
)
goto usage
)
goto fetch
:clean
echo.Cleaning up external libraries.
for /D %%d in (
bzip2-*
db-*
nasm-*
openssl-*
tcl-*
tcltk*
tk-*
tix-*
sqlite-*
xz-*
) do (
echo.Removing %%d
rmdir /s /q %%d
)
if "%1"=="--clean-only" (
goto end
)
:fetch
rem Fetch current versions
svn --version > nul 2>&1
if ERRORLEVEL 9009 (
echo.svn.exe must be on your PATH.
echo.Try TortoiseSVN (http://tortoisesvn.net/^) and be sure to check the
echo.command line tools option.
popd
exit /b 1
)
echo.Fetching external libraries...
set libraries=
set libraries=%libraries% bzip2-1.0.6
if NOT "%IncludeSSL%"=="false" set libraries=%libraries% nasm-2.11.06
if NOT "%IncludeSSL%"=="false" set libraries=%libraries% openssl-1.0.2k
set libraries=%libraries% sqlite-3.14.2.0
if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tcl-core-8.6.6.0
if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tk-8.6.6.0
if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tix-8.4.3.6
set libraries=%libraries% xz-5.2.2
for %%e in (%libraries%) do (
if exist %%e (
echo.%%e already exists, skipping.
) else (
echo.Fetching %%e...
svn export -q %SVNROOT%%%e
)
)
goto end
:usage
echo.invalid argument: %1
echo.usage: %~n0 [[ -c ^| --clean ] ^| --clean-only ]
echo.
echo.Pull all sources necessary for compiling optional extension modules
echo.that rely on external libraries. Requires svn.exe to be on your PATH
echo.and pulls sources from %SVNROOT%.
echo.
echo.Use the -c or --clean option to clean up all external library sources
echo.before pulling in the current versions.
echo.
echo.Use the --clean-only option to do the same cleaning, without pulling in
echo.anything new.
echo.
echo.Only the first argument is checked, all others are ignored.
echo.
echo.**WARNING**: the cleaning options unconditionally remove any directory
echo.that is a child of
echo. %CD%
echo.and matches wildcard patterns beginning with bzip2-, db-, nasm-, openssl-,
echo.tcl-, tcltk, tk-, tix-, sqlite-, or xz-, and as such has the potential
echo.to be very destructive if you are not aware of what it is doing. Use with
echo.caution!
popd
exit /b -1
:end
echo Finished.
popd
@echo off
setlocal
rem Simple script to fetch source for external libraries
if not exist "%~dp0..\externals" mkdir "%~dp0..\externals"
pushd "%~dp0..\externals"
if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/
rem Optionally clean up first. Be warned that this can be very destructive!
if not "%1"=="" (
for %%c in (-c --clean --clean-only) do (
if "%1"=="%%c" goto clean
)
goto usage
)
goto fetch
:clean
echo.Cleaning up external libraries.
for /D %%d in (
bzip2-*
db-*
nasm-*
openssl-*
tcl-*
tcltk*
tk-*
tix-*
sqlite-*
xz-*
) do (
echo.Removing %%d
rmdir /s /q %%d
)
if "%1"=="--clean-only" (
goto end
)
:fetch
rem Fetch current versions
svn --version > nul 2>&1
if ERRORLEVEL 9009 (
echo.svn.exe must be on your PATH.
echo.Try TortoiseSVN (http://tortoisesvn.net/^) and be sure to check the
echo.command line tools option.
popd
exit /b 1
)
echo.Fetching external libraries...
set libraries=
set libraries=%libraries% bzip2-1.0.6
if NOT "%IncludeSSL%"=="false" set libraries=%libraries% nasm-2.11.06
if NOT "%IncludeSSL%"=="false" set libraries=%libraries% openssl-1.0.2k
set libraries=%libraries% sqlite-3.14.2.0
if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tcl-core-8.6.6.0
if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tk-8.6.6.0
if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tix-8.4.3.6
set libraries=%libraries% xz-5.2.2
for %%e in (%libraries%) do (
if exist %%e (
echo.%%e already exists, skipping.
) else (
echo.Fetching %%e...
svn export -q %SVNROOT%%%e
)
)
goto end
:usage
echo.invalid argument: %1
echo.usage: %~n0 [[ -c ^| --clean ] ^| --clean-only ]
echo.
echo.Pull all sources necessary for compiling optional extension modules
echo.that rely on external libraries. Requires svn.exe to be on your PATH
echo.and pulls sources from %SVNROOT%.
echo.
echo.Use the -c or --clean option to clean up all external library sources
echo.before pulling in the current versions.
echo.
echo.Use the --clean-only option to do the same cleaning, without pulling in
echo.anything new.
echo.
echo.Only the first argument is checked, all others are ignored.
echo.
echo.**WARNING**: the cleaning options unconditionally remove any directory
echo.that is a child of
echo. %CD%
echo.and matches wildcard patterns beginning with bzip2-, db-, nasm-, openssl-,
echo.tcl-, tcltk, tk-, tix-, sqlite-, or xz-, and as such has the potential
echo.to be very destructive if you are not aware of what it is doing. Use with
echo.caution!
popd
exit /b -1
:end
echo Finished.
popd
@echo off
rem start idle
rem Usage: idle [-d]
rem -d Run Debug build (python_d.exe). Else release build.
setlocal
set exe=win32\python
PATH %PATH%;..\externals\tcltk\bin
if "%1"=="-d" (set exe=%exe%_d) & shift
set cmd=%exe% ../Lib/idlelib/idle.py %1 %2 %3 %4 %5 %6 %7 %8 %9
echo on
%cmd%
@echo off
rem start idle
rem Usage: idle [-d]
rem -d Run Debug build (python_d.exe). Else release build.
setlocal
set exe=win32\python
PATH %PATH%;..\externals\tcltk\bin
if "%1"=="-d" (set exe=%exe%_d) & shift
set cmd=%exe% ../Lib/idlelib/idle.py %1 %2 %3 %4 %5 %6 %7 %8 %9
echo on
%cmd%
This source diff could not be displayed because it is too large. You can view the blob instead.
@echo off
if not defined HOST_PYTHON (
if "%1" EQU "Debug" (
shift
set HOST_PYTHON=python_d.exe
if not exist python37_d.dll exit 1
) ELSE (
set HOST_PYTHON=python.exe
if not exist python37.dll exit 1
)
)
%HOST_PYTHON% "%~dp0prepare_ssl.py" %1
@echo off
if not defined HOST_PYTHON (
if "%1" EQU "Debug" (
shift
set HOST_PYTHON=python_d.exe
if not exist python37_d.dll exit 1
) ELSE (
set HOST_PYTHON=python.exe
if not exist python37.dll exit 1
)
)
%HOST_PYTHON% "%~dp0prepare_ssl.py" %1
This diff is collapsed.
@echo off
rem Run Tests. Run the regression test suite.
rem Usage: rt [-d] [-O] [-q] [-x64] regrtest_args
rem -d Run Debug build (python_d.exe). Else release build.
rem -O Run python.exe or python_d.exe (see -d) with -O.
rem -q "quick" -- normally the tests are run twice, the first time
rem after deleting all the .pyc files reachable from Lib/.
rem -q runs the tests just once, and without deleting .pyc files.
rem -x64 Run the 64-bit build of python (or python_d if -d was specified)
rem from the 'amd64' dir instead of the 32-bit build in this dir.
rem All leading instances of these switches are shifted off, and
rem whatever remains (up to 9 arguments) is passed to regrtest.py.
rem For example,
rem rt -O -d -x test_thread
rem runs
rem python_d -O ../lib/test/regrtest.py -x test_thread
rem twice, and
rem rt -q -g test_binascii
rem runs
rem python_d ../lib/test/regrtest.py -g test_binascii
rem to generate the expected-output file for binascii quickly.
rem
rem Confusing: if you want to pass a comma-separated list, like
rem -u network,largefile
rem then you have to quote it on the rt line, like
rem rt -u "network,largefile"
setlocal
set pcbuild=%~dp0
set prefix=%pcbuild%win32\
set suffix=
set qmode=
set dashO=
set regrtestargs=
:CheckOpts
if "%1"=="-O" (set dashO=-O) & shift & goto CheckOpts
if "%1"=="-q" (set qmode=yes) & shift & goto CheckOpts
if "%1"=="-d" (set suffix=_d) & shift & goto CheckOpts
if "%1"=="-x64" (set prefix=%pcbuild%amd64\) & shift & goto CheckOpts
if NOT "%1"=="" (set regrtestargs=%regrtestargs% %1) & shift & goto CheckOpts
set exe=%prefix%python%suffix%.exe
set cmd="%exe%" %dashO% -u -Wd -E -bb -m test %regrtestargs%
if defined qmode goto Qmode
echo Deleting .pyc files ...
"%exe%" "%pcbuild%rmpyc.py"
echo Cleaning _pth files ...
if exist %prefix%*._pth del %prefix%*._pth
echo on
%cmd%
@echo off
echo About to run again without deleting .pyc first:
pause
:Qmode
echo on
%cmd%
@echo off
rem Run Tests. Run the regression test suite.
rem Usage: rt [-d] [-O] [-q] [-x64] regrtest_args
rem -d Run Debug build (python_d.exe). Else release build.
rem -O Run python.exe or python_d.exe (see -d) with -O.
rem -q "quick" -- normally the tests are run twice, the first time
rem after deleting all the .pyc files reachable from Lib/.
rem -q runs the tests just once, and without deleting .pyc files.
rem -x64 Run the 64-bit build of python (or python_d if -d was specified)
rem from the 'amd64' dir instead of the 32-bit build in this dir.
rem All leading instances of these switches are shifted off, and
rem whatever remains (up to 9 arguments) is passed to regrtest.py.
rem For example,
rem rt -O -d -x test_thread
rem runs
rem python_d -O ../lib/test/regrtest.py -x test_thread
rem twice, and
rem rt -q -g test_binascii
rem runs
rem python_d ../lib/test/regrtest.py -g test_binascii
rem to generate the expected-output file for binascii quickly.
rem
rem Confusing: if you want to pass a comma-separated list, like
rem -u network,largefile
rem then you have to quote it on the rt line, like
rem rt -u "network,largefile"
setlocal
set pcbuild=%~dp0
set prefix=%pcbuild%win32\
set suffix=
set qmode=
set dashO=
set regrtestargs=
:CheckOpts
if "%1"=="-O" (set dashO=-O) & shift & goto CheckOpts
if "%1"=="-q" (set qmode=yes) & shift & goto CheckOpts
if "%1"=="-d" (set suffix=_d) & shift & goto CheckOpts
if "%1"=="-x64" (set prefix=%pcbuild%amd64\) & shift & goto CheckOpts
if NOT "%1"=="" (set regrtestargs=%regrtestargs% %1) & shift & goto CheckOpts
set exe=%prefix%python%suffix%.exe
set cmd="%exe%" %dashO% -u -Wd -E -bb -m test %regrtestargs%
if defined qmode goto Qmode
echo Deleting .pyc files ...
"%exe%" "%pcbuild%rmpyc.py"
echo Cleaning _pth files ...
if exist %prefix%*._pth del %prefix%*._pth
echo on
%cmd%
@echo off
echo About to run again without deleting .pyc first:
pause
:Qmode
echo on
%cmd%
@rem Used by the buildbot "compile" step.
@rem Clean up
call "%~dp0clean.bat" %*
@rem If you need the buildbots to start fresh (such as when upgrading to
@rem a new version of an external library, especially Tcl/Tk):
@rem 1) uncomment the following line:
@rem call "%~dp0..\..\PCbuild\get_externals.bat" --clean-only
@rem 2) commit and push
@rem 3) wait for all Windows bots to start a build with that changeset
@rem 4) re-comment, commit and push again
@rem Do the build
call "%~dp0..\..\PCbuild\build.bat" -e -d -k -v %*
@rem Used by the buildbot "compile" step.
@rem Clean up
call "%~dp0clean.bat" %*
@rem If you need the buildbots to start fresh (such as when upgrading to
@rem a new version of an external library, especially Tcl/Tk):
@rem 1) uncomment the following line:
@rem call "%~dp0..\..\PCbuild\get_externals.bat" --clean-only
@rem 2) commit and push
@rem 3) wait for all Windows bots to start a build with that changeset
@rem 4) re-comment, commit and push again
@rem Do the build
call "%~dp0..\..\PCbuild\build.bat" -e -d -k -v %*
@rem Used by the buildbot "buildmsi" step.
setlocal
pushd
@rem build both snapshot MSIs
call "%~dp0..\msi\build.bat" -x86 -x64
@rem Used by the buildbot "buildmsi" step.
setlocal
pushd
@rem build both snapshot MSIs
call "%~dp0..\msi\build.bat" -x86 -x64
popd
\ No newline at end of file
@echo off
rem Used by the buildbot "clean" step.
setlocal
set root=%~dp0..\..
set pcbuild=%root%\PCbuild
echo Deleting build
call "%pcbuild%\build.bat" -t Clean -k %*
call "%pcbuild%\build.bat" -t Clean -k -d %*
echo Deleting .pyc/.pyo files ...
del /s "%root%\Lib\*.pyc" "%root%\Lib\*.pyo"
echo Deleting test leftovers ...
rmdir /s /q "%root%\build"
del /s "%pcbuild%\python*.zip"
@echo off
rem Used by the buildbot "clean" step.
setlocal
set root=%~dp0..\..
set pcbuild=%root%\PCbuild
echo Deleting build
call "%pcbuild%\build.bat" -t Clean -k %*
call "%pcbuild%\build.bat" -t Clean -k -d %*
echo Deleting .pyc/.pyo files ...
del /s "%root%\Lib\*.pyc" "%root%\Lib\*.pyo"
echo Deleting test leftovers ...
rmdir /s /q "%root%\build"
del /s "%pcbuild%\python*.zip"
@echo off
rem Used by the buildbot "test" step.
setlocal
set here=%~dp0
set rt_opts=-q -d
set regrtest_args=-j1
:CheckOpts
if "%1"=="-x64" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
if "%1"=="-d" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
if "%1"=="-O" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
if "%1"=="-q" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
if "%1"=="+d" (set rt_opts=%rt_opts:-d=%) & shift & goto CheckOpts
if "%1"=="+q" (set rt_opts=%rt_opts:-q=%) & shift & goto CheckOpts
if NOT "%1"=="" (set regrtest_args=%regrtest_args% %1) & shift & goto CheckOpts
echo on
call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW --slowest --timeout=1200 %regrtest_args%
@echo off
rem Used by the buildbot "test" step.
setlocal
set here=%~dp0
set rt_opts=-q -d
set regrtest_args=-j1
:CheckOpts
if "%1"=="-x64" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
if "%1"=="-d" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
if "%1"=="-O" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
if "%1"=="-q" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
if "%1"=="+d" (set rt_opts=%rt_opts:-d=%) & shift & goto CheckOpts
if "%1"=="+q" (set rt_opts=%rt_opts:-q=%) & shift & goto CheckOpts
if NOT "%1"=="" (set regrtest_args=%regrtest_args% %1) & shift & goto CheckOpts
echo on
call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW --slowest --timeout=1200 %regrtest_args%
@echo off
setlocal
set D=%~dp0
set PCBUILD=%D%..\..\PCBuild\
set BUILDX86=
set BUILDX64=
set BUILDDOC=
set BUILDTEST=--test-marker
set BUILDPACK=
set REBUILD=
:CheckOpts
if "%~1" EQU "-h" goto Help
if "%~1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
if "%~1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
if "%~1" EQU "--doc" (set BUILDDOC=1) && shift && goto CheckOpts
if "%~1" EQU "--no-test-marker" (set BUILDTEST=) && shift && goto CheckOpts
if "%~1" EQU "--pack" (set BUILDPACK=1) && shift && goto CheckOpts
if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts
if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)
call "%D%get_externals.bat"
call "%PCBUILD%env.bat" x86
if defined BUILDX86 (
call "%PCBUILD%build.bat" -d -e %REBUILD% %BUILDTEST%
if errorlevel 1 goto :eof
call "%PCBUILD%build.bat" -e %REBUILD% %BUILDTEST%
if errorlevel 1 goto :eof
)
if defined BUILDX64 (
call "%PCBUILD%build.bat" -p x64 -d -e %REBUILD% %BUILDTEST%
if errorlevel 1 goto :eof
call "%PCBUILD%build.bat" -p x64 -e %REBUILD% %BUILDTEST%
if errorlevel 1 goto :eof
)
if defined BUILDDOC (
call "%PCBUILD%..\Doc\make.bat" htmlhelp
if errorlevel 1 goto :eof
)
rem Build the launcher MSI separately
msbuild "%D%launcher\launcher.wixproj" /p:Platform=x86
set BUILD_CMD="%D%bundle\snapshot.wixproj"
if defined BUILDTEST (
set BUILD_CMD=%BUILD_CMD% /p:UseTestMarker=true
)
if defined BUILDPACK (
set BUILD_CMD=%BUILD_CMD% /p:Pack=true
)
if defined REBUILD (
set BUILD_CMD=%BUILD_CMD% /t:Rebuild
)
if defined BUILDX86 (
msbuild %BUILD_CMD%
if errorlevel 1 goto :eof
)
if defined BUILDX64 (
msbuild /p:Platform=x64 %BUILD_CMD%
if errorlevel 1 goto :eof
)
exit /B 0
:Help
echo build.bat [-x86] [-x64] [--doc] [-h] [--no-test-marker] [--pack] [-r]
echo.
echo -x86 Build x86 installers
echo -x64 Build x64 installers
echo --doc Build CHM documentation
echo --no-test-marker Build without test markers
echo --pack Embed core MSIs into installer
echo -r Rebuild rather than incremental build
@echo off
setlocal
set D=%~dp0
set PCBUILD=%D%..\..\PCBuild\
set BUILDX86=
set BUILDX64=
set BUILDDOC=
set BUILDTEST=--test-marker
set BUILDPACK=
set REBUILD=
:CheckOpts
if "%~1" EQU "-h" goto Help
if "%~1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
if "%~1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
if "%~1" EQU "--doc" (set BUILDDOC=1) && shift && goto CheckOpts
if "%~1" EQU "--no-test-marker" (set BUILDTEST=) && shift && goto CheckOpts
if "%~1" EQU "--pack" (set BUILDPACK=1) && shift && goto CheckOpts
if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts
if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)
call "%D%get_externals.bat"
call "%PCBUILD%env.bat" x86
if defined BUILDX86 (
call "%PCBUILD%build.bat" -d -e %REBUILD% %BUILDTEST%
if errorlevel 1 goto :eof
call "%PCBUILD%build.bat" -e %REBUILD% %BUILDTEST%
if errorlevel 1 goto :eof
)
if defined BUILDX64 (
call "%PCBUILD%build.bat" -p x64 -d -e %REBUILD% %BUILDTEST%
if errorlevel 1 goto :eof
call "%PCBUILD%build.bat" -p x64 -e %REBUILD% %BUILDTEST%
if errorlevel 1 goto :eof
)
if defined BUILDDOC (
call "%PCBUILD%..\Doc\make.bat" htmlhelp
if errorlevel 1 goto :eof
)
rem Build the launcher MSI separately
msbuild "%D%launcher\launcher.wixproj" /p:Platform=x86
set BUILD_CMD="%D%bundle\snapshot.wixproj"
if defined BUILDTEST (
set BUILD_CMD=%BUILD_CMD% /p:UseTestMarker=true
)
if defined BUILDPACK (
set BUILD_CMD=%BUILD_CMD% /p:Pack=true
)
if defined REBUILD (
set BUILD_CMD=%BUILD_CMD% /t:Rebuild
)
if defined BUILDX86 (
msbuild %BUILD_CMD%
if errorlevel 1 goto :eof
)
if defined BUILDX64 (
msbuild /p:Platform=x64 %BUILD_CMD%
if errorlevel 1 goto :eof
)
exit /B 0
:Help
echo build.bat [-x86] [-x64] [--doc] [-h] [--no-test-marker] [--pack] [-r]
echo.
echo -x86 Build x86 installers
echo -x64 Build x64 installers
echo --doc Build CHM documentation
echo --no-test-marker Build without test markers
echo --pack Embed core MSIs into installer
echo -r Rebuild rather than incremental build
This diff is collapsed.
@echo off
setlocal
rem Simple script to fetch source for external tools
where /Q svn
if ERRORLEVEL 1 (
echo.svn.exe must be on your PATH to get external tools.
echo.Try TortoiseSVN (http://tortoisesvn.net/^) and be sure to check the
echo.command line tools option.
popd
exit /b 1
)
if not exist "%~dp0..\..\externals" mkdir "%~dp0..\..\externals"
pushd "%~dp0..\..\externals"
if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/
if not exist "windows-installer\.svn" (
echo.Checking out installer dependencies to %CD%\windows-installer
svn co %SVNROOT%windows-installer
) else (
echo.Updating installer dependencies in %CD%\windows-installer
svn up windows-installer
)
popd
@echo off
setlocal
rem Simple script to fetch source for external tools
where /Q svn
if ERRORLEVEL 1 (
echo.svn.exe must be on your PATH to get external tools.
echo.Try TortoiseSVN (http://tortoisesvn.net/^) and be sure to check the
echo.command line tools option.
popd
exit /b 1
)
if not exist "%~dp0..\..\externals" mkdir "%~dp0..\..\externals"
pushd "%~dp0..\..\externals"
if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/
if not exist "windows-installer\.svn" (
echo.Checking out installer dependencies to %CD%\windows-installer
svn co %SVNROOT%windows-installer
) else (
echo.Updating installer dependencies in %CD%\windows-installer
svn up windows-installer
)
popd
@setlocal enableextensions
@echo off
set D=%~dp0
set PCBUILD=%D%..\..\PCBuild\
set TARGETDIR=%TEMP%
set TESTX86=
set TESTX64=
set TESTALLUSER=
set TESTPERUSER=
:CheckOpts
if "%1" EQU "-h" goto Help
if "%1" EQU "-x86" (set TESTX86=1) && shift && goto CheckOpts
if "%1" EQU "-x64" (set TESTX64=1) && shift && goto CheckOpts
if "%1" EQU "-t" (set TARGETDIR=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "--target" (set TARGETDIR=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "-a" (set TESTALLUSER=1) && shift && goto CheckOpts
if "%1" EQU "--alluser" (set TESTALLUSER=1) && shift && goto CheckOpts
if "%1" EQU "-p" (set TESTPERUSER=1) && shift && goto CheckOpts
if "%1" EQU "--peruser" (set TESTPERUSER=1) && shift && goto CheckOpts
if not defined TESTX86 if not defined TESTX64 (set TESTX86=1) && (set TESTX64=1)
if not defined TESTALLUSER if not defined TESTPERUSER (set TESTALLUSER=1) && (set TESTPERUSER=1)
if defined TESTX86 (
for %%f in ("%PCBUILD%win32\en-us\*.exe") do (
if defined TESTALLUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-alluser" "InstallAllUsers=1 CompileAll=1"
if errorlevel 1 exit /B
if defined TESTPERUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-peruser" "InstallAllUsers=0 CompileAll=0"
if errorlevel 1 exit /B
)
)
if defined TESTX64 (
for %%f in ("%PCBUILD%amd64\en-us\*.exe") do (
if defined TESTALLUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-alluser" "InstallAllUsers=1 CompileAll=1"
if errorlevel 1 exit /B
if defined TESTPERUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-peruser" "InstallAllUsers=0 CompileAll=0"
if errorlevel 1 exit /B
)
)
exit /B 0
:test
@setlocal
@echo on
@if not exist "%~1" exit /B 1
@set EXE=%~1
@if not "%EXE:embed=%"=="%EXE%" exit /B 0
@set EXITCODE=0
@echo Installing %1 into %2
"%~1" /passive /log "%~2\install\log.txt" TargetDir="%~2\Python" Include_debug=1 Include_symbols=1 %~3
@if not errorlevel 1 (
@echo Printing version
"%~2\Python\python.exe" -c "import sys; print(sys.version)" > "%~2\version.txt" 2>&1
)
@if not errorlevel 1 (
@echo Capturing Start Menu
@dir /s/b "%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs" | findstr /ic:"python" > "%~2\startmenu.txt" 2>&1
@dir /s/b "%APPDATA%\Microsoft\Windows\Start Menu\Programs" | findstr /ic:"python" >> "%~2\startmenu.txt" 2>&1
@echo Capturing registry
@for /F "usebackq" %%f in (`reg query HKCR /s /f python /k`) do @(
echo %%f >> "%~2\hkcr.txt"
reg query "%%f" /s >> "%~2\hkcr.txt" 2>&1
)
@reg query HKCU\Software\Python /s > "%~2\hkcu.txt" 2>&1
@reg query HKLM\Software\Python /reg:32 /s > "%~2\hklm.txt" 2>&1
@reg query HKLM\Software\Python /reg:64 /s >> "%~2\hklm.txt" 2>&1
cmd /k exit 0
)
@if not errorlevel 1 (
@echo Installing package
"%~2\Python\python.exe" -m pip install "azure<0.10" > "%~2\pip.txt" 2>&1
@if not errorlevel 1 (
"%~2\Python\python.exe" -m pip uninstall -y azure python-dateutil six >> "%~2\pip.txt" 2>&1
)
)
@if not errorlevel 1 (
@echo Testing Tcl/tk
@set TCL_LIBRARY=%~2\Python\tcl\tcl8.6
"%~2\Python\python.exe" -m test -uall -v test_ttk_guionly test_tk test_idle > "%~2\tcltk.txt" 2>&1
@set TCL_LIBRARY=
)
@set EXITCODE=%ERRORLEVEL%
@echo Result was %EXITCODE%
@echo Removing %1
"%~1" /passive /uninstall /log "%~2\uninstall\log.txt"
@echo off
exit /B %EXITCODE%
:Help
echo testrelease.bat [--target TARGET] [-x86] [-x64] [--alluser] [--peruser] [-h]
echo.
echo --target (-t) Specify the target directory for installs and logs
echo -x86 Run tests for x86 installers
echo -x64 Run tests for x64 installers
echo --alluser (-a) Run tests for all-user installs (requires Administrator)
echo --peruser (-p) Run tests for per-user installs
echo -h Display this help information
echo.
echo If no test architecture is specified, all architectures will be tested.
echo If no install type is selected, all install types will be tested.
echo.
@setlocal enableextensions
@echo off
set D=%~dp0
set PCBUILD=%D%..\..\PCBuild\
set TARGETDIR=%TEMP%
set TESTX86=
set TESTX64=
set TESTALLUSER=
set TESTPERUSER=
:CheckOpts
if "%1" EQU "-h" goto Help
if "%1" EQU "-x86" (set TESTX86=1) && shift && goto CheckOpts
if "%1" EQU "-x64" (set TESTX64=1) && shift && goto CheckOpts
if "%1" EQU "-t" (set TARGETDIR=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "--target" (set TARGETDIR=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "-a" (set TESTALLUSER=1) && shift && goto CheckOpts
if "%1" EQU "--alluser" (set TESTALLUSER=1) && shift && goto CheckOpts
if "%1" EQU "-p" (set TESTPERUSER=1) && shift && goto CheckOpts
if "%1" EQU "--peruser" (set TESTPERUSER=1) && shift && goto CheckOpts
if not defined TESTX86 if not defined TESTX64 (set TESTX86=1) && (set TESTX64=1)
if not defined TESTALLUSER if not defined TESTPERUSER (set TESTALLUSER=1) && (set TESTPERUSER=1)
if defined TESTX86 (
for %%f in ("%PCBUILD%win32\en-us\*.exe") do (
if defined TESTALLUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-alluser" "InstallAllUsers=1 CompileAll=1"
if errorlevel 1 exit /B
if defined TESTPERUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-peruser" "InstallAllUsers=0 CompileAll=0"
if errorlevel 1 exit /B
)
)
if defined TESTX64 (
for %%f in ("%PCBUILD%amd64\en-us\*.exe") do (
if defined TESTALLUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-alluser" "InstallAllUsers=1 CompileAll=1"
if errorlevel 1 exit /B
if defined TESTPERUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-peruser" "InstallAllUsers=0 CompileAll=0"
if errorlevel 1 exit /B
)
)
exit /B 0
:test
@setlocal
@echo on
@if not exist "%~1" exit /B 1
@set EXE=%~1
@if not "%EXE:embed=%"=="%EXE%" exit /B 0
@set EXITCODE=0
@echo Installing %1 into %2
"%~1" /passive /log "%~2\install\log.txt" TargetDir="%~2\Python" Include_debug=1 Include_symbols=1 %~3
@if not errorlevel 1 (
@echo Printing version
"%~2\Python\python.exe" -c "import sys; print(sys.version)" > "%~2\version.txt" 2>&1
)
@if not errorlevel 1 (
@echo Capturing Start Menu
@dir /s/b "%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs" | findstr /ic:"python" > "%~2\startmenu.txt" 2>&1
@dir /s/b "%APPDATA%\Microsoft\Windows\Start Menu\Programs" | findstr /ic:"python" >> "%~2\startmenu.txt" 2>&1
@echo Capturing registry
@for /F "usebackq" %%f in (`reg query HKCR /s /f python /k`) do @(
echo %%f >> "%~2\hkcr.txt"
reg query "%%f" /s >> "%~2\hkcr.txt" 2>&1
)
@reg query HKCU\Software\Python /s > "%~2\hkcu.txt" 2>&1
@reg query HKLM\Software\Python /reg:32 /s > "%~2\hklm.txt" 2>&1
@reg query HKLM\Software\Python /reg:64 /s >> "%~2\hklm.txt" 2>&1
cmd /k exit 0
)
@if not errorlevel 1 (
@echo Installing package
"%~2\Python\python.exe" -m pip install "azure<0.10" > "%~2\pip.txt" 2>&1
@if not errorlevel 1 (
"%~2\Python\python.exe" -m pip uninstall -y azure python-dateutil six >> "%~2\pip.txt" 2>&1
)
)
@if not errorlevel 1 (
@echo Testing Tcl/tk
@set TCL_LIBRARY=%~2\Python\tcl\tcl8.6
"%~2\Python\python.exe" -m test -uall -v test_ttk_guionly test_tk test_idle > "%~2\tcltk.txt" 2>&1
@set TCL_LIBRARY=
)
@set EXITCODE=%ERRORLEVEL%
@echo Result was %EXITCODE%
@echo Removing %1
"%~1" /passive /uninstall /log "%~2\uninstall\log.txt"
@echo off
exit /B %EXITCODE%
:Help
echo testrelease.bat [--target TARGET] [-x86] [-x64] [--alluser] [--peruser] [-h]
echo.
echo --target (-t) Specify the target directory for installs and logs
echo -x86 Run tests for x86 installers
echo -x64 Run tests for x64 installers
echo --alluser (-a) Run tests for all-user installs (requires Administrator)
echo --peruser (-p) Run tests for per-user installs
echo -h Display this help information
echo.
echo If no test architecture is specified, all architectures will be tested.
echo If no install type is selected, all install types will be tested.
echo.
@setlocal
@echo off
set D=%~dp0
set PCBUILD=%D%..\..\PCBuild\
set HOST=
set USER=
set TARGET=
set DRYRUN=false
set NOGPG=
set PURGE_OPTION=/p:Purge=true
set NOTEST=
:CheckOpts
if "%1" EQU "-h" goto Help
if "%1" EQU "-o" (set HOST=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "--host" (set HOST=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "-u" (set USER=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "--user" (set USER=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "-t" (set TARGET=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "--target" (set TARGET=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "--dry-run" (set DRYRUN=true) && shift && goto CheckOpts
if "%1" EQU "--skip-gpg" (set NOGPG=true) && shift && goto CheckOpts
if "%1" EQU "--skip-purge" (set PURGE_OPTION=) && shift && godo CheckOpts
if "%1" EQU "--skip-test" (set NOTEST=true) && shift && godo CheckOpts
if "%1" EQU "-T" (set NOTEST=true) && shift && godo CheckOpts
if "%1" NEQ "" echo Unexpected argument "%1" & exit /B 1
if not defined PLINK where plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc"
if not defined PLINK where /R "%ProgramFiles(x86)%\PuTTY" plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc"
if not defined PLINK where /R "%ProgramFiles(x86)%" plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc"
if not defined PLINK echo Cannot locate plink.exe & exit /B 1
echo Found plink.exe at %PLINK%
if not defined PSCP where pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc"
if not defined PSCP where /R "%ProgramFiles(x86)%\PuTTY" pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc"
if not defined PSCP where /R "%ProgramFiles(x86)%" pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc"
if not defined PSCP echo Cannot locate pscp.exe & exit /B 1
echo Found pscp.exe at %PSCP%
if defined NOGPG (
set GPG=
echo Skipping GPG signature generation because of --skip-gpg
) else (
if not defined GPG where gpg2 > "%TEMP%\gpg.loc" 2> nul && set /P GPG= < "%TEMP%\gpg.loc" & del "%TEMP%\gpg.loc"
if not defined GPG where /R "%PCBUILD%..\externals\windows-installer" gpg2 > "%TEMP%\gpg.loc" 2> nul && set /P GPG= < "%TEMP%\gpg.loc" & del "%TEMP%\gpg.loc"
if not defined GPG echo Cannot locate gpg2.exe. Signatures will not be uploaded & pause
echo Found gpg2.exe at %GPG%
)
call "%PCBUILD%env.bat" > nul 2> nul
pushd "%D%"
msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x86 %PURGE_OPTION%
msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x64 /p:IncludeDoc=false %PURGE_OPTION%
if not defined NOTEST (
msbuild /v:m /nologo uploadrelease.proj /t:Test /p:Platform=x86
msbuild /v:m /nologo uploadrelease.proj /t:Test /p:Platform=x64
)
msbuild /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x86
msbuild /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x64 /p:IncludeDoc=false
popd
exit /B 0
:Help
echo uploadrelease.bat --host HOST --user USERNAME [--target TARGET] [--dry-run] [-h]
echo.
echo --host (-o) Specify the upload host (required)
echo --user (-u) Specify the user on the host (required)
echo --target (-t) Specify the target directory on the host
echo --dry-run Display commands and filenames without executing them
echo --skip-gpg Does not generate GPG signatures before uploading
echo --skip-purge Does not perform CDN purge after uploading
echo --skip-test (-T) Does not perform post-upload tests
echo -h Display this help information
echo.
@setlocal
@echo off
set D=%~dp0
set PCBUILD=%D%..\..\PCBuild\
set HOST=
set USER=
set TARGET=
set DRYRUN=false
set NOGPG=
set PURGE_OPTION=/p:Purge=true
set NOTEST=
:CheckOpts
if "%1" EQU "-h" goto Help
if "%1" EQU "-o" (set HOST=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "--host" (set HOST=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "-u" (set USER=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "--user" (set USER=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "-t" (set TARGET=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "--target" (set TARGET=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "--dry-run" (set DRYRUN=true) && shift && goto CheckOpts
if "%1" EQU "--skip-gpg" (set NOGPG=true) && shift && goto CheckOpts
if "%1" EQU "--skip-purge" (set PURGE_OPTION=) && shift && godo CheckOpts
if "%1" EQU "--skip-test" (set NOTEST=true) && shift && godo CheckOpts
if "%1" EQU "-T" (set NOTEST=true) && shift && godo CheckOpts
if "%1" NEQ "" echo Unexpected argument "%1" & exit /B 1
if not defined PLINK where plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc"
if not defined PLINK where /R "%ProgramFiles(x86)%\PuTTY" plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc"
if not defined PLINK where /R "%ProgramFiles(x86)%" plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc"
if not defined PLINK echo Cannot locate plink.exe & exit /B 1
echo Found plink.exe at %PLINK%
if not defined PSCP where pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc"
if not defined PSCP where /R "%ProgramFiles(x86)%\PuTTY" pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc"
if not defined PSCP where /R "%ProgramFiles(x86)%" pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc"
if not defined PSCP echo Cannot locate pscp.exe & exit /B 1
echo Found pscp.exe at %PSCP%
if defined NOGPG (
set GPG=
echo Skipping GPG signature generation because of --skip-gpg
) else (
if not defined GPG where gpg2 > "%TEMP%\gpg.loc" 2> nul && set /P GPG= < "%TEMP%\gpg.loc" & del "%TEMP%\gpg.loc"
if not defined GPG where /R "%PCBUILD%..\externals\windows-installer" gpg2 > "%TEMP%\gpg.loc" 2> nul && set /P GPG= < "%TEMP%\gpg.loc" & del "%TEMP%\gpg.loc"
if not defined GPG echo Cannot locate gpg2.exe. Signatures will not be uploaded & pause
echo Found gpg2.exe at %GPG%
)
call "%PCBUILD%env.bat" > nul 2> nul
pushd "%D%"
msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x86 %PURGE_OPTION%
msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x64 /p:IncludeDoc=false %PURGE_OPTION%
if not defined NOTEST (
msbuild /v:m /nologo uploadrelease.proj /t:Test /p:Platform=x86
msbuild /v:m /nologo uploadrelease.proj /t:Test /p:Platform=x64
)
msbuild /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x86
msbuild /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x64 /p:IncludeDoc=false
popd
exit /B 0
:Help
echo uploadrelease.bat --host HOST --user USERNAME [--target TARGET] [--dry-run] [-h]
echo.
echo --host (-o) Specify the upload host (required)
echo --user (-u) Specify the user on the host (required)
echo --target (-t) Specify the target directory on the host
echo --dry-run Display commands and filenames without executing them
echo --skip-gpg Does not generate GPG signatures before uploading
echo --skip-purge Does not perform CDN purge after uploading
echo --skip-test (-T) Does not perform post-upload tests
echo -h Display this help information
echo.
@echo off
setlocal
set D=%~dp0
set PCBUILD=%D%..\..\PCBuild\
set BUILDX86=
set BUILDX64=
set REBUILD=
set OUTPUT=
set PACKAGES=
:CheckOpts
if "%~1" EQU "-h" goto Help
if "%~1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
if "%~1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts
if "%~1" EQU "-o" (set OUTPUT="/p:OutputPath=%~2") && shift && shift && goto CheckOpts
if "%~1" EQU "--out" (set OUTPUT="/p:OutputPath=%~2") && shift && shift && goto CheckOpts
if "%~1" EQU "-p" (set PACKAGES=%PACKAGES% %~2) && shift && shift && goto CheckOpts
if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)
call "%D%..\msi\get_externals.bat"
call "%PCBUILD%env.bat" x86
if defined PACKAGES set PACKAGES="/p:Packages=%PACKAGES%"
if defined BUILDX86 (
if defined REBUILD ( call "%PCBUILD%build.bat" -e -r
) else if not exist "%PCBUILD%win32\python.exe" call "%PCBUILD%build.bat" -e
if errorlevel 1 goto :eof
msbuild "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x86 %OUTPUT% %PACKAGES%
if errorlevel 1 goto :eof
)
if defined BUILDX64 (
if defined REBUILD ( call "%PCBUILD%build.bat" -p x64 -e -r
) else if not exist "%PCBUILD%amd64\python.exe" call "%PCBUILD%build.bat" -p x64 -e
if errorlevel 1 goto :eof
msbuild "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x64 %OUTPUT% %PACKAGES%
if errorlevel 1 goto :eof
)
exit /B 0
:Help
echo build.bat [-x86] [-x64] [--out DIR] [-r] [-h]
echo.
echo -x86 Build x86 installers
echo -x64 Build x64 installers
echo -r Rebuild rather than incremental build
echo --out [DIR] Override output directory
echo -h Show usage
@echo off
setlocal
set D=%~dp0
set PCBUILD=%D%..\..\PCBuild\
set BUILDX86=
set BUILDX64=
set REBUILD=
set OUTPUT=
set PACKAGES=
:CheckOpts
if "%~1" EQU "-h" goto Help
if "%~1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
if "%~1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts
if "%~1" EQU "-o" (set OUTPUT="/p:OutputPath=%~2") && shift && shift && goto CheckOpts
if "%~1" EQU "--out" (set OUTPUT="/p:OutputPath=%~2") && shift && shift && goto CheckOpts
if "%~1" EQU "-p" (set PACKAGES=%PACKAGES% %~2) && shift && shift && goto CheckOpts
if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)
call "%D%..\msi\get_externals.bat"
call "%PCBUILD%env.bat" x86
if defined PACKAGES set PACKAGES="/p:Packages=%PACKAGES%"
if defined BUILDX86 (
if defined REBUILD ( call "%PCBUILD%build.bat" -e -r
) else if not exist "%PCBUILD%win32\python.exe" call "%PCBUILD%build.bat" -e
if errorlevel 1 goto :eof
msbuild "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x86 %OUTPUT% %PACKAGES%
if errorlevel 1 goto :eof
)
if defined BUILDX64 (
if defined REBUILD ( call "%PCBUILD%build.bat" -p x64 -e -r
) else if not exist "%PCBUILD%amd64\python.exe" call "%PCBUILD%build.bat" -p x64 -e
if errorlevel 1 goto :eof
msbuild "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x64 %OUTPUT% %PACKAGES%
if errorlevel 1 goto :eof
)
exit /B 0
:Help
echo build.bat [-x86] [-x64] [--out DIR] [-r] [-h]
echo.
echo -x86 Build x86 installers
echo -x64 Build x64 installers
echo -r Rebuild rather than incremental build
echo --out [DIR] Override output directory
echo -h Show usage
@rem Recreate some python charmap codecs from the Windows function
@rem MultiByteToWideChar.
@cd /d %~dp0
@mkdir build
@rem Arabic DOS code page
c:\python30\python genwincodec.py 720 > build/cp720.py
@rem Recreate some python charmap codecs from the Windows function
@rem MultiByteToWideChar.
@cd /d %~dp0
@mkdir build
@rem Arabic DOS code page
c:\python30\python genwincodec.py 720 > build/cp720.py
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment