mirror of
https://github.com/python/cpython
synced 2026-09-29 07:25:29 +03:00
Merge
This commit is contained in:
commit
20d31b5182
24 changed files with 931 additions and 925 deletions
6
.hgeol
6
.hgeol
|
|
@ -40,6 +40,12 @@ Lib/venv/scripts/nt/* = BIN
|
|||
|
||||
Lib/test/coding20731.py = BIN
|
||||
|
||||
# Windows batch files work best with CRLF, there can be subtle problems with LF
|
||||
**.bat = CRLF
|
||||
|
||||
# The Windows readme is likely to be read in Notepad, so make it readable
|
||||
PCbuild/readme.txt = CRLF
|
||||
|
||||
# All other files (which presumably are human-editable) are "native".
|
||||
# This must be the last rule!
|
||||
|
||||
|
|
|
|||
248
Doc/make.bat
248
Doc/make.bat
|
|
@ -1,124 +1,124 @@
|
|||
@echo off
|
||||
setlocal
|
||||
|
||||
pushd %~dp0
|
||||
|
||||
set this=%~n0
|
||||
|
||||
if "%SPHINXBUILD%" EQU "" set SPHINXBUILD=sphinx-build
|
||||
if "%PYTHON%" EQU "" set PYTHON=py
|
||||
|
||||
if DEFINED ProgramFiles(x86) set _PRGMFLS=%ProgramFiles(x86)%
|
||||
if NOT DEFINED ProgramFiles(x86) set _PRGMFLS=%ProgramFiles%
|
||||
if "%HTMLHELP%" EQU "" set HTMLHELP=%_PRGMFLS%\HTML Help Workshop\hhc.exe
|
||||
|
||||
if "%DISTVERSION%" EQU "" for /f "usebackq" %%v in (`%PYTHON% tools/extensions/patchlevel.py`) do set DISTVERSION=%%v
|
||||
|
||||
if "%BUILDDIR%" EQU "" set BUILDDIR=build
|
||||
|
||||
rem Targets that don't require sphinx-build
|
||||
if "%1" EQU "" goto help
|
||||
if "%1" EQU "help" goto help
|
||||
if "%1" EQU "check" goto check
|
||||
if "%1" EQU "serve" goto serve
|
||||
if "%1" == "clean" (
|
||||
rmdir /q /s %BUILDDIR%
|
||||
goto end
|
||||
)
|
||||
|
||||
%SPHINXBUILD% 2> nul
|
||||
if errorlevel 9009 (
|
||||
echo.
|
||||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
||||
echo.installed, then set the SPHINXBUILD environment variable to point
|
||||
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.http://sphinx-doc.org/
|
||||
goto end
|
||||
)
|
||||
|
||||
rem Targets that do require sphinx-build and have their own label
|
||||
if "%1" EQU "htmlview" goto htmlview
|
||||
|
||||
rem Everything else
|
||||
goto build
|
||||
|
||||
:help
|
||||
echo.usage: %this% BUILDER [filename ...]
|
||||
echo.
|
||||
echo.Call %this% with the desired Sphinx builder as the first argument, e.g.
|
||||
echo.``%this% html`` or ``%this% doctest``. Interesting targets that are
|
||||
echo.always available include:
|
||||
echo.
|
||||
echo. Provided by Sphinx:
|
||||
echo. html, htmlhelp, latex, text
|
||||
echo. suspicious, linkcheck, changes, doctest
|
||||
echo. Provided by this script:
|
||||
echo. clean, check, serve, htmlview
|
||||
echo.
|
||||
echo.All arguments past the first one are passed through to sphinx-build as
|
||||
echo.filenames to build or are ignored. See README.txt in this directory or
|
||||
echo.the documentation for your version of Sphinx for more exhaustive lists
|
||||
echo.of available targets and descriptions of each.
|
||||
echo.
|
||||
echo.This script assumes that the SPHINXBUILD environment variable contains
|
||||
echo.a legitimate command for calling sphinx-build, or that sphinx-build is
|
||||
echo.on your PATH if SPHINXBUILD is not set. Options for sphinx-build can
|
||||
echo.be passed by setting the SPHINXOPTS environment variable.
|
||||
goto end
|
||||
|
||||
:build
|
||||
if NOT "%PAPER%" == "" (
|
||||
set SPHINXOPTS=-D latex_paper_size=%PAPER% %SPHINXOPTS%
|
||||
)
|
||||
cmd /C %SPHINXBUILD% %SPHINXOPTS% -b%1 -dbuild\doctrees . %BUILDDIR%\%*
|
||||
|
||||
if "%1" EQU "htmlhelp" (
|
||||
if not exist "%HTMLHELP%" (
|
||||
echo.
|
||||
echo.The HTML Help Workshop was not found. Set the HTMLHELP variable
|
||||
echo.to the path to hhc.exe or download and install it from
|
||||
echo.http://msdn.microsoft.com/en-us/library/ms669985
|
||||
rem Set errorlevel to 1 and exit
|
||||
cmd /C exit /b 1
|
||||
goto end
|
||||
)
|
||||
cmd /C "%HTMLHELP%" build\htmlhelp\python%DISTVERSION:.=%.hhp
|
||||
rem hhc.exe seems to always exit with code 1, reset to 0 for less than 2
|
||||
if not errorlevel 2 cmd /C exit /b 0
|
||||
)
|
||||
|
||||
echo.
|
||||
if errorlevel 1 (
|
||||
echo.Build failed (exit code %ERRORLEVEL%^), check for error messages
|
||||
echo.above. Any output will be found in %BUILDDIR%\%1
|
||||
) else (
|
||||
echo.Build succeeded. All output should be in %BUILDDIR%\%1
|
||||
)
|
||||
goto end
|
||||
|
||||
:htmlview
|
||||
if NOT "%2" EQU "" (
|
||||
echo.Can't specify filenames to build with htmlview target, ignoring.
|
||||
)
|
||||
cmd /C %this% html
|
||||
|
||||
if EXIST %BUILDDIR%\html\index.html (
|
||||
echo.Opening %BUILDDIR%\html\index.html in the default web browser...
|
||||
start %BUILDDIR%\html\index.html
|
||||
)
|
||||
|
||||
goto end
|
||||
|
||||
:check
|
||||
cmd /C %PYTHON% tools\rstlint.py -i tools
|
||||
goto end
|
||||
|
||||
:serve
|
||||
cmd /C %PYTHON% ..\Tools\scripts\serve.py %BUILDDIR%\html
|
||||
goto end
|
||||
|
||||
:end
|
||||
popd
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
pushd %~dp0
|
||||
|
||||
set this=%~n0
|
||||
|
||||
if "%SPHINXBUILD%" EQU "" set SPHINXBUILD=sphinx-build
|
||||
if "%PYTHON%" EQU "" set PYTHON=py
|
||||
|
||||
if DEFINED ProgramFiles(x86) set _PRGMFLS=%ProgramFiles(x86)%
|
||||
if NOT DEFINED ProgramFiles(x86) set _PRGMFLS=%ProgramFiles%
|
||||
if "%HTMLHELP%" EQU "" set HTMLHELP=%_PRGMFLS%\HTML Help Workshop\hhc.exe
|
||||
|
||||
if "%DISTVERSION%" EQU "" for /f "usebackq" %%v in (`%PYTHON% tools/extensions/patchlevel.py`) do set DISTVERSION=%%v
|
||||
|
||||
if "%BUILDDIR%" EQU "" set BUILDDIR=build
|
||||
|
||||
rem Targets that don't require sphinx-build
|
||||
if "%1" EQU "" goto help
|
||||
if "%1" EQU "help" goto help
|
||||
if "%1" EQU "check" goto check
|
||||
if "%1" EQU "serve" goto serve
|
||||
if "%1" == "clean" (
|
||||
rmdir /q /s %BUILDDIR%
|
||||
goto end
|
||||
)
|
||||
|
||||
%SPHINXBUILD% 2> nul
|
||||
if errorlevel 9009 (
|
||||
echo.
|
||||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
||||
echo.installed, then set the SPHINXBUILD environment variable to point
|
||||
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.http://sphinx-doc.org/
|
||||
goto end
|
||||
)
|
||||
|
||||
rem Targets that do require sphinx-build and have their own label
|
||||
if "%1" EQU "htmlview" goto htmlview
|
||||
|
||||
rem Everything else
|
||||
goto build
|
||||
|
||||
:help
|
||||
echo.usage: %this% BUILDER [filename ...]
|
||||
echo.
|
||||
echo.Call %this% with the desired Sphinx builder as the first argument, e.g.
|
||||
echo.``%this% html`` or ``%this% doctest``. Interesting targets that are
|
||||
echo.always available include:
|
||||
echo.
|
||||
echo. Provided by Sphinx:
|
||||
echo. html, htmlhelp, latex, text
|
||||
echo. suspicious, linkcheck, changes, doctest
|
||||
echo. Provided by this script:
|
||||
echo. clean, check, serve, htmlview
|
||||
echo.
|
||||
echo.All arguments past the first one are passed through to sphinx-build as
|
||||
echo.filenames to build or are ignored. See README.txt in this directory or
|
||||
echo.the documentation for your version of Sphinx for more exhaustive lists
|
||||
echo.of available targets and descriptions of each.
|
||||
echo.
|
||||
echo.This script assumes that the SPHINXBUILD environment variable contains
|
||||
echo.a legitimate command for calling sphinx-build, or that sphinx-build is
|
||||
echo.on your PATH if SPHINXBUILD is not set. Options for sphinx-build can
|
||||
echo.be passed by setting the SPHINXOPTS environment variable.
|
||||
goto end
|
||||
|
||||
:build
|
||||
if NOT "%PAPER%" == "" (
|
||||
set SPHINXOPTS=-D latex_paper_size=%PAPER% %SPHINXOPTS%
|
||||
)
|
||||
cmd /C %SPHINXBUILD% %SPHINXOPTS% -b%1 -dbuild\doctrees . %BUILDDIR%\%*
|
||||
|
||||
if "%1" EQU "htmlhelp" (
|
||||
if not exist "%HTMLHELP%" (
|
||||
echo.
|
||||
echo.The HTML Help Workshop was not found. Set the HTMLHELP variable
|
||||
echo.to the path to hhc.exe or download and install it from
|
||||
echo.http://msdn.microsoft.com/en-us/library/ms669985
|
||||
rem Set errorlevel to 1 and exit
|
||||
cmd /C exit /b 1
|
||||
goto end
|
||||
)
|
||||
cmd /C "%HTMLHELP%" build\htmlhelp\python%DISTVERSION:.=%.hhp
|
||||
rem hhc.exe seems to always exit with code 1, reset to 0 for less than 2
|
||||
if not errorlevel 2 cmd /C exit /b 0
|
||||
)
|
||||
|
||||
echo.
|
||||
if errorlevel 1 (
|
||||
echo.Build failed (exit code %ERRORLEVEL%^), check for error messages
|
||||
echo.above. Any output will be found in %BUILDDIR%\%1
|
||||
) else (
|
||||
echo.Build succeeded. All output should be in %BUILDDIR%\%1
|
||||
)
|
||||
goto end
|
||||
|
||||
:htmlview
|
||||
if NOT "%2" EQU "" (
|
||||
echo.Can't specify filenames to build with htmlview target, ignoring.
|
||||
)
|
||||
cmd /C %this% html
|
||||
|
||||
if EXIST %BUILDDIR%\html\index.html (
|
||||
echo.Opening %BUILDDIR%\html\index.html in the default web browser...
|
||||
start %BUILDDIR%\html\index.html
|
||||
)
|
||||
|
||||
goto end
|
||||
|
||||
:check
|
||||
cmd /C %PYTHON% tools\rstlint.py -i tools
|
||||
goto end
|
||||
|
||||
:serve
|
||||
cmd /C %PYTHON% ..\Tools\scripts\serve.py %BUILDDIR%\html
|
||||
goto end
|
||||
|
||||
:end
|
||||
popd
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
svn export --force http://svn.red-bean.com/bob/macholib/trunk/macholib/ .
|
||||
svn export --force http://svn.red-bean.com/bob/macholib/trunk/macholib/ .
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@echo off
|
||||
rem Start IDLE using the appropriate Python interpreter
|
||||
set CURRDIR=%~dp0
|
||||
start "IDLE" "%CURRDIR%..\..\pythonw.exe" "%CURRDIR%idle.pyw" %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||
@echo off
|
||||
rem Start IDLE using the appropriate Python interpreter
|
||||
set CURRDIR=%~dp0
|
||||
start "IDLE" "%CURRDIR%..\..\pythonw.exe" "%CURRDIR%idle.pyw" %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||
|
|
|
|||
|
|
@ -1,111 +1,111 @@
|
|||
@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
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
@echo off
|
||||
rem A batch program to build or rebuild a particular configuration.
|
||||
rem just for convenience.
|
||||
|
||||
setlocal
|
||||
set platf=Win32
|
||||
set conf=Release
|
||||
set target=build
|
||||
set dir=%~dp0
|
||||
|
||||
:CheckOpts
|
||||
if "%1"=="-c" (set conf=%2) & shift & shift & goto CheckOpts
|
||||
if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts
|
||||
if "%1"=="-r" (set target=rebuild) & shift & goto CheckOpts
|
||||
if "%1"=="-d" (set conf=Debug) & shift & goto CheckOpts
|
||||
|
||||
set cmd=msbuild /p:useenv=true %dir%pcbuild.sln /t:%target% /p:Configuration=%conf% /p:Platform=%platf%
|
||||
echo %cmd%
|
||||
%cmd%
|
||||
@echo off
|
||||
rem A batch program to build or rebuild a particular configuration.
|
||||
rem just for convenience.
|
||||
|
||||
setlocal
|
||||
set platf=Win32
|
||||
set conf=Release
|
||||
set target=build
|
||||
set dir=%~dp0
|
||||
|
||||
:CheckOpts
|
||||
if "%1"=="-c" (set conf=%2) & shift & shift & goto CheckOpts
|
||||
if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts
|
||||
if "%1"=="-r" (set target=rebuild) & shift & goto CheckOpts
|
||||
if "%1"=="-d" (set conf=Debug) & shift & goto CheckOpts
|
||||
|
||||
set cmd=msbuild /p:useenv=true %dir%pcbuild.sln /t:%target% /p:Configuration=%conf% /p:Platform=%platf%
|
||||
echo %cmd%
|
||||
%cmd%
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
@%comspec% /k env.bat %*
|
||||
@%comspec% /k env.bat %*
|
||||
|
|
|
|||
|
|
@ -1,41 +1,41 @@
|
|||
@echo off
|
||||
rem A batch program to build PGO (Profile guided optimization) by first
|
||||
rem building instrumented binaries, then running the testsuite, and
|
||||
rem finally building the optimized code.
|
||||
rem Note, after the first instrumented run, one can just keep on
|
||||
rem building the PGUpdate configuration while developing.
|
||||
|
||||
setlocal
|
||||
set platf=Win32
|
||||
|
||||
rem use the performance testsuite. This is quick and simple
|
||||
set job1=..\tools\pybench\pybench.py -n 1 -C 1 --with-gc
|
||||
set path1=..\tools\pybench
|
||||
|
||||
rem or the whole testsuite for more thorough testing
|
||||
set job2=..\lib\test\regrtest.py
|
||||
set path2=..\lib
|
||||
|
||||
set job=%job1%
|
||||
set clrpath=%path1%
|
||||
|
||||
:CheckOpts
|
||||
if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts
|
||||
if "%1"=="-2" (set job=%job2%) & (set clrpath=%path2%) & shift & goto CheckOpts
|
||||
|
||||
set PGI=%platf%-pgi
|
||||
set PGO=%platf%-pgo
|
||||
|
||||
@echo on
|
||||
rem build the instrumented version
|
||||
call build -p %platf% -c PGInstrument
|
||||
|
||||
rem remove .pyc files, .pgc files and execute the job
|
||||
%PGI%\python.exe rmpyc.py %clrpath%
|
||||
del %PGI%\*.pgc
|
||||
%PGI%\python.exe %job%
|
||||
|
||||
rem finally build the optimized version
|
||||
if exist %PGO% del /s /q %PGO%
|
||||
call build -p %platf% -c PGUpdate
|
||||
|
||||
@echo off
|
||||
rem A batch program to build PGO (Profile guided optimization) by first
|
||||
rem building instrumented binaries, then running the testsuite, and
|
||||
rem finally building the optimized code.
|
||||
rem Note, after the first instrumented run, one can just keep on
|
||||
rem building the PGUpdate configuration while developing.
|
||||
|
||||
setlocal
|
||||
set platf=Win32
|
||||
|
||||
rem use the performance testsuite. This is quick and simple
|
||||
set job1=..\tools\pybench\pybench.py -n 1 -C 1 --with-gc
|
||||
set path1=..\tools\pybench
|
||||
|
||||
rem or the whole testsuite for more thorough testing
|
||||
set job2=..\lib\test\regrtest.py
|
||||
set path2=..\lib
|
||||
|
||||
set job=%job1%
|
||||
set clrpath=%path1%
|
||||
|
||||
:CheckOpts
|
||||
if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts
|
||||
if "%1"=="-2" (set job=%job2%) & (set clrpath=%path2%) & shift & goto CheckOpts
|
||||
|
||||
set PGI=%platf%-pgi
|
||||
set PGO=%platf%-pgo
|
||||
|
||||
@echo on
|
||||
rem build the instrumented version
|
||||
call build -p %platf% -c PGInstrument
|
||||
|
||||
rem remove .pyc files, .pgc files and execute the job
|
||||
%PGI%\python.exe rmpyc.py %clrpath%
|
||||
del %PGI%\*.pgc
|
||||
%PGI%\python.exe %job%
|
||||
|
||||
rem finally build the optimized version
|
||||
if exist %PGO% del /s /q %PGO%
|
||||
call build -p %platf% -c PGUpdate
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
@echo off
|
||||
if not defined HOST_PYTHON (
|
||||
if %1 EQU Debug (
|
||||
set HOST_PYTHON=python_d.exe
|
||||
if not exist python34_d.dll exit 1
|
||||
) ELSE (
|
||||
set HOST_PYTHON=python.exe
|
||||
if not exist python34.dll exit 1
|
||||
)
|
||||
)
|
||||
%HOST_PYTHON% build_ssl.py %1 %2 %3
|
||||
|
||||
@echo off
|
||||
if not defined HOST_PYTHON (
|
||||
if %1 EQU Debug (
|
||||
set HOST_PYTHON=python_d.exe
|
||||
if not exist python34_d.dll exit 1
|
||||
) ELSE (
|
||||
set HOST_PYTHON=python.exe
|
||||
if not exist python34.dll exit 1
|
||||
)
|
||||
)
|
||||
%HOST_PYTHON% build_ssl.py %1 %2 %3
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
@echo off
|
||||
set VS10=%ProgramFiles(x86)%\Microsoft Visual Studio 10.0
|
||||
IF EXIST "%VS10%" GOTO ok
|
||||
set VS10=%ProgramFiles%\Microsoft Visual Studio 10.0
|
||||
:ok
|
||||
|
||||
echo Build environments: x86, ia64, amd64, x86_amd64, x86_ia64
|
||||
echo.
|
||||
call "%VS10%\VC\vcvarsall.bat" %1
|
||||
@echo off
|
||||
set VS10=%ProgramFiles(x86)%\Microsoft Visual Studio 10.0
|
||||
IF EXIST "%VS10%" GOTO ok
|
||||
set VS10=%ProgramFiles%\Microsoft Visual Studio 10.0
|
||||
:ok
|
||||
|
||||
echo Build environments: x86, ia64, amd64, x86_amd64, x86_ia64
|
||||
echo.
|
||||
call "%VS10%\VC\vcvarsall.bat" %1
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
@echo off
|
||||
rem start idle
|
||||
rem Usage: idle [-d]
|
||||
rem -d Run Debug build (python_d.exe). Else release build.
|
||||
|
||||
setlocal
|
||||
set exe=python
|
||||
PATH %PATH%;..\..\tcltk\bin
|
||||
|
||||
if "%1"=="-d" (set exe=python_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=python
|
||||
PATH %PATH%;..\..\tcltk\bin
|
||||
|
||||
if "%1"=="-d" (set exe=python_d) & shift
|
||||
|
||||
set cmd=%exe% ../Lib/idlelib/idle.py %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||
|
||||
echo on
|
||||
%cmd%
|
||||
|
|
|
|||
|
|
@ -1,354 +1,354 @@
|
|||
Building Python using Microsoft Visual C++
|
||||
------------------------------------------
|
||||
|
||||
This directory is used to build CPython for Microsoft Windows NT version
|
||||
5.1 or higher (Windows XP, Windows Server 2003, or later) on 32 and 64
|
||||
bit platforms. Using this directory requires an installation of
|
||||
Microsoft Visual C++ 2010 (MSVC 10.0) of any edition. The specific
|
||||
requirements are as follows:
|
||||
|
||||
Visual C++ 2010 Express Edition
|
||||
Required for building 32-bit Debug and Release configuration builds.
|
||||
The Python build solution pcbuild.sln makes use of Solution Folders,
|
||||
which this edition does not support. Any time pcbuild.sln is opened
|
||||
or reloaded by Visual C++, a warning about Solution Folders will be
|
||||
displayed which can be safely dismissed with no impact on your
|
||||
ability to build Python.
|
||||
Visual Studio 2010 Professional Edition
|
||||
Required for building 64-bit Debug and Release configuration builds
|
||||
Visual Studio 2010 Premium Edition
|
||||
Required for building Release configuration builds that make use of
|
||||
Profile Guided Optimization (PGO), on either platform.
|
||||
|
||||
Installing Service Pack 1 for Visual Studio 2010 is highly recommended
|
||||
to avoid LNK1123 errors.
|
||||
|
||||
All you need to do to build is open the solution "pcbuild.sln" in Visual
|
||||
Studio, select the desired combination of configuration and platform,
|
||||
then build with "Build Solution" or the F7 keyboard shortcut. You can
|
||||
also build from the command line using the "build.bat" script in this
|
||||
directory. The solution is configured to build the projects in the
|
||||
correct order.
|
||||
|
||||
The solution currently supports two platforms. The Win32 platform is
|
||||
used to build standard x86-compatible 32-bit binaries, output into this
|
||||
directory. The x64 platform is used for building 64-bit AMD64 (aka
|
||||
x86_64 or EM64T) binaries, output into the amd64 sub-directory which
|
||||
will be created if it doesn't already exist. The Itanium (IA-64)
|
||||
platform is no longer supported. See the "Building for AMD64" section
|
||||
below for more information about 64-bit builds.
|
||||
|
||||
Four configuration options are supported by the solution:
|
||||
Debug
|
||||
Used to build Python with extra debugging capabilities, equivalent
|
||||
to using ./configure --with-pydebug on UNIX. All binaries built
|
||||
using this configuration have "_d" added to their name:
|
||||
python34_d.dll, python_d.exe, parser_d.pyd, and so on. Both the
|
||||
build and rt (run test) batch files in this directory accept a -d
|
||||
option for debug builds. If you are building Python to help with
|
||||
development of CPython, you will most likely use this configuration.
|
||||
PGInstrument, PGUpdate
|
||||
Used to build Python in Release configuration using PGO, which
|
||||
requires Premium Edition of Visual Studio. See the "Profile
|
||||
Guided Optimization" section below for more information. Build
|
||||
output from each of these configurations lands in its own
|
||||
sub-directory of this directory. The official Python releases are
|
||||
built using these configurations.
|
||||
Release
|
||||
Used to build Python as it is meant to be used in production
|
||||
settings, though without PGO.
|
||||
|
||||
|
||||
Legacy support
|
||||
--------------
|
||||
|
||||
You can find build directories for older versions of Visual Studio and
|
||||
Visual C++ in the PC directory. The legacy build directories are no
|
||||
longer actively maintained and may not work out of the box.
|
||||
|
||||
Currently, the only legacy build directory is PC\VS9.0, for Visual
|
||||
Studio 2008 (9.0).
|
||||
|
||||
|
||||
C Runtime
|
||||
---------
|
||||
|
||||
Visual Studio 2010 uses version 10 of the C runtime (MSVCRT10). The
|
||||
executables no longer use the "Side by Side" assemblies used in previous
|
||||
versions of the compiler. This simplifies distribution of applications.
|
||||
|
||||
The run time libraries are available under the VC/Redist folder of your
|
||||
Visual Studio distribution. For more info, see the Readme in the
|
||||
VC/Redist folder.
|
||||
|
||||
|
||||
Sub-Projects
|
||||
------------
|
||||
|
||||
The CPython project is split up into several smaller sub-projects which
|
||||
are managed by the pcbuild.sln solution file. Each sub-project is
|
||||
represented by a .vcxproj and a .vcxproj.filters file starting with the
|
||||
name of the sub-project. These sub-projects fall into a few general
|
||||
categories:
|
||||
|
||||
The following sub-projects represent the bare minimum required to build
|
||||
a functioning CPython interpreter. If nothing else builds but these,
|
||||
you'll have a very limited but usable python.exe:
|
||||
pythoncore
|
||||
.dll and .lib
|
||||
python
|
||||
.exe
|
||||
kill_python
|
||||
kill_python.exe, a small program designed to kill any instances of
|
||||
python(_d).exe that are running and live in the build output
|
||||
directory; this is meant to avoid build issues due to locked files
|
||||
make_buildinfo, make_versioninfo
|
||||
helpers to provide necessary information to the build process
|
||||
|
||||
These sub-projects provide extra executables that are useful for running
|
||||
CPython in different ways:
|
||||
pythonw
|
||||
pythonw.exe, a variant of python.exe that doesn't open a Command
|
||||
Prompt window
|
||||
pylauncher
|
||||
py.exe, the Python Launcher for Windows, see
|
||||
http://docs.python.org/3/using/windows.html#launcher
|
||||
pywlauncher
|
||||
pyw.exe, a variant of py.exe that doesn't open a Command Prompt
|
||||
window
|
||||
_testembed
|
||||
_testembed.exe, a small program that embeds Python for testing
|
||||
purposes, used by test_capi.py
|
||||
|
||||
These are miscellaneous sub-projects that don't really fit the other
|
||||
categories. By default, these projects do not build in Debug
|
||||
configuration:
|
||||
_freeze_importlib
|
||||
_freeze_importlib.exe, used to regenerate Python\importlib.h after
|
||||
changes have been made to Lib\importlib\_bootstrap.py
|
||||
bdist_wininst
|
||||
..\Lib\distutils\command\wininst-10.0[-amd64].exe, the base
|
||||
executable used by the distutils bdist_wininst command
|
||||
python3dll
|
||||
python3.dll, the PEP 384 Stable ABI dll
|
||||
xxlimited
|
||||
builds an example module that makes use of the PEP 384 Stable ABI,
|
||||
see Modules\xxlimited.c
|
||||
|
||||
The following sub-projects are for individual modules of the standard
|
||||
library which are implemented in C; each one builds a DLL (renamed to
|
||||
.pyd) of the same name as the project:
|
||||
_ctypes
|
||||
_ctypes_test
|
||||
_decimal
|
||||
_elementtree
|
||||
_hashlib
|
||||
_msi
|
||||
_multiprocessing
|
||||
_overlapped
|
||||
_socket
|
||||
_testcapi
|
||||
_testbuffer
|
||||
_testimportmultiple
|
||||
pyexpat
|
||||
select
|
||||
unicodedata
|
||||
winsound
|
||||
|
||||
The following Python-controlled sub-projects wrap external projects.
|
||||
Note that these external libraries are not necessary for a working
|
||||
interpreter, but they do implement several major features. See the
|
||||
"Getting External Sources" section below for additional information
|
||||
about getting the source for building these libraries. The sub-projects
|
||||
are:
|
||||
_bz2
|
||||
Python wrapper for version 1.0.6 of the libbzip2 compression library
|
||||
Homepage:
|
||||
http://www.bzip.org/
|
||||
_lzma
|
||||
Python wrapper for the liblzma compression library, using pre-built
|
||||
binaries of XZ Utils version 5.0.5
|
||||
Homepage:
|
||||
http://tukaani.org/xz/
|
||||
_ssl
|
||||
Python wrapper for version 1.0.2a of the OpenSSL secure sockets
|
||||
library, which is built by ssl.vcxproj
|
||||
Homepage:
|
||||
http://www.openssl.org/
|
||||
|
||||
Building OpenSSL requires nasm.exe (the Netwide Assembler), version
|
||||
2.10 or newer from
|
||||
http://www.nasm.us/
|
||||
to be somewhere on your PATH. More recent versions of OpenSSL may
|
||||
need a later version of NASM. If OpenSSL's self tests don't pass,
|
||||
you should first try to update NASM and do a full rebuild of
|
||||
OpenSSL. If you use the Tools\buildbot\external(-amd64).bat method
|
||||
for getting sources, it also downloads a version of NASM which the
|
||||
ssl build script will add to PATH.
|
||||
|
||||
If you like to use the official sources instead of the files from
|
||||
python.org's subversion repository, Perl is required to build the
|
||||
necessary makefiles and assembly files. ActivePerl is available
|
||||
from
|
||||
http://www.activestate.com/activeperl/
|
||||
The svn.python.org version contains pre-built makefiles and assembly
|
||||
files.
|
||||
|
||||
The build process makes sure that no patented algorithms are
|
||||
included. For now RC5, MDC2 and IDEA are excluded from the build.
|
||||
You may have to manually remove $(OBJ_D)\i_*.obj from ms\nt.mak if
|
||||
using official sources; the svn.python.org-hosted version is already
|
||||
fixed.
|
||||
|
||||
The ssl.vcxproj sub-project simply invokes PCbuild/build_ssl.py,
|
||||
which locates and builds OpenSSL.
|
||||
|
||||
build_ssl.py attempts to catch the most common errors (such as not
|
||||
being able to find OpenSSL sources, or not being able to find a Perl
|
||||
that works with OpenSSL) and give a reasonable error message. If
|
||||
you have a problem that doesn't seem to be handled correctly (e.g.,
|
||||
you know you have ActivePerl but we can't find it), please take a
|
||||
peek at build_ssl.py and suggest patches. Note that build_ssl.py
|
||||
should be able to be run directly from the command-line.
|
||||
|
||||
The ssl sub-project does not have the ability to clean the OpenSSL
|
||||
build; if you need to rebuild, you'll have to clean it by hand.
|
||||
_sqlite3
|
||||
Wraps SQLite 3.8.3.1, which is itself built by sqlite3.vcxproj
|
||||
Homepage:
|
||||
http://www.sqlite.org/
|
||||
_tkinter
|
||||
Wraps version 8.6.1 of the Tk windowing system.
|
||||
Homepage:
|
||||
http://www.tcl.tk/
|
||||
|
||||
Unlike the other external libraries listed above, Tk must be built
|
||||
separately before the _tkinter module can be built. This means that
|
||||
a pre-built Tcl/Tk installation is expected in ..\externals\tcltk
|
||||
(tcltk64 for 64-bit) relative to this directory. See "Getting
|
||||
External Sources" below for the easiest method to ensure Tcl/Tk is
|
||||
built.
|
||||
|
||||
|
||||
Getting External Sources
|
||||
------------------------
|
||||
|
||||
The last category of sub-projects listed above wrap external projects
|
||||
Python doesn't control, and as such a little more work is required in
|
||||
order to download the relevant source files for each project before they
|
||||
can be built. The buildbots must ensure that all libraries are present
|
||||
before building, so the easiest approach is to run either external.bat
|
||||
or external-amd64.bat (depending on platform) in the ..\Tools\buildbot
|
||||
directory from ..\, i.e.:
|
||||
|
||||
C:\python\cpython\PCbuild>cd ..
|
||||
C:\python\cpython>Tools\buildbot\external.bat
|
||||
|
||||
This extracts all the external sub-projects from
|
||||
http://svn.python.org/projects/external
|
||||
via Subversion (so you'll need an svn.exe on your PATH) and places them
|
||||
in ..\externals (relative to this directory).
|
||||
|
||||
It is also possible to download sources from each project's homepage,
|
||||
though you may have to change the names of some folders in order to make
|
||||
things work. For instance, if you were to download a version 5.0.7 of
|
||||
XZ Utils, you would need to extract the archive into ..\externals\xz-5.0.5
|
||||
anyway, since that is where the solution is set to look for xz. The
|
||||
same is true for all other external projects.
|
||||
|
||||
The external(-amd64).bat scripts will also build a debug build of
|
||||
Tcl/Tk, but there aren't any equivalent batch files for building release
|
||||
versions of Tcl/Tk currently available. If you need to build a release
|
||||
version of Tcl/Tk, just take a look at the relevant external(-amd64).bat
|
||||
file and find the two nmake lines, then call each one without the
|
||||
'DEBUG=1' parameter, i.e.:
|
||||
|
||||
The external-amd64.bat file contains this for tcl:
|
||||
nmake -f makefile.vc DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 clean all install
|
||||
|
||||
So for a release build, you'd call it as:
|
||||
nmake -f makefile.vc MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 clean all install
|
||||
|
||||
Note that the above command is called from within ..\externals\tcl-8.6.1.0\win
|
||||
(relative to this directory); don't forget to build Tk as well as Tcl!
|
||||
|
||||
This will be cleaned up in the future; http://bugs.python.org/issue15968
|
||||
tracks adding a new tcltk.vcxproj file that will build Tcl/Tk and Tix
|
||||
the same way the other external projects listed above are built.
|
||||
|
||||
|
||||
Building for AMD64
|
||||
------------------
|
||||
|
||||
The build process for AMD64 / x64 is very similar to standard builds,
|
||||
you just have to set x64 as platform. In addition, the HOST_PYTHON
|
||||
environment variable must point to a Python interpreter (at least 2.4),
|
||||
to support cross-compilation from Win32. Note that Visual Studio
|
||||
requires Professional Edition or better in order to build 64-bit
|
||||
binaries.
|
||||
|
||||
|
||||
Profile Guided Optimization
|
||||
---------------------------
|
||||
|
||||
The solution has two configurations for PGO. The PGInstrument
|
||||
configuration must be built first. The PGInstrument binaries are linked
|
||||
against a profiling library and contain extra debug information. The
|
||||
PGUpdate configuration takes the profiling data and generates optimized
|
||||
binaries.
|
||||
|
||||
The build_pgo.bat script automates the creation of optimized binaries.
|
||||
It creates the PGI files, runs the unit test suite or PyBench with the
|
||||
PGI python, and finally creates the optimized files.
|
||||
|
||||
See
|
||||
http://msdn.microsoft.com/en-us/library/e7k32f4k(VS.100).aspx
|
||||
for more on this topic.
|
||||
|
||||
|
||||
Static library
|
||||
--------------
|
||||
|
||||
The solution has no configuration for static libraries. However it is
|
||||
easy to build a static library instead of a DLL. You simply have to set
|
||||
the "Configuration Type" to "Static Library (.lib)" and alter the
|
||||
preprocessor macro "Py_ENABLE_SHARED" to "Py_NO_ENABLE_SHARED". You may
|
||||
also have to change the "Runtime Library" from "Multi-threaded DLL
|
||||
(/MD)" to "Multi-threaded (/MT)".
|
||||
|
||||
|
||||
Visual Studio properties
|
||||
------------------------
|
||||
|
||||
The PCbuild solution makes heavy use of Visual Studio property files
|
||||
(*.props). The properties can be viewed and altered in the Property
|
||||
Manager (View -> Other Windows -> Property Manager).
|
||||
|
||||
The property files used are (+-- = "also imports"):
|
||||
* debug (debug macro: _DEBUG)
|
||||
* pginstrument (PGO)
|
||||
* pgupdate (PGO)
|
||||
+-- pginstrument
|
||||
* pyd (python extension, release build)
|
||||
+-- release
|
||||
+-- pyproject
|
||||
* pyd_d (python extension, debug build)
|
||||
+-- debug
|
||||
+-- pyproject
|
||||
* pyproject (base settings for all projects, user macros like PyDllName)
|
||||
* release (release macro: NDEBUG)
|
||||
* sqlite3 (used only by sqlite3.vcxproj)
|
||||
* x64 (AMD64 / x64 platform specific settings)
|
||||
|
||||
The pyproject property file defines _WIN32 and x64 defines _WIN64 and
|
||||
_M_X64 although the macros are set by the compiler, too. The GUI doesn't
|
||||
always know about the macros and confuse the user with false
|
||||
information.
|
||||
|
||||
|
||||
Your Own Extension DLLs
|
||||
-----------------------
|
||||
|
||||
If you want to create your own extension module DLL (.pyd), there's an
|
||||
example with easy-to-follow instructions in ..\PC\example\; read the
|
||||
file readme.txt there first.
|
||||
Building Python using Microsoft Visual C++
|
||||
------------------------------------------
|
||||
|
||||
This directory is used to build CPython for Microsoft Windows NT version
|
||||
5.1 or higher (Windows XP, Windows Server 2003, or later) on 32 and 64
|
||||
bit platforms. Using this directory requires an installation of
|
||||
Microsoft Visual C++ 2010 (MSVC 10.0) of any edition. The specific
|
||||
requirements are as follows:
|
||||
|
||||
Visual C++ 2010 Express Edition
|
||||
Required for building 32-bit Debug and Release configuration builds.
|
||||
The Python build solution pcbuild.sln makes use of Solution Folders,
|
||||
which this edition does not support. Any time pcbuild.sln is opened
|
||||
or reloaded by Visual C++, a warning about Solution Folders will be
|
||||
displayed which can be safely dismissed with no impact on your
|
||||
ability to build Python.
|
||||
Visual Studio 2010 Professional Edition
|
||||
Required for building 64-bit Debug and Release configuration builds
|
||||
Visual Studio 2010 Premium Edition
|
||||
Required for building Release configuration builds that make use of
|
||||
Profile Guided Optimization (PGO), on either platform.
|
||||
|
||||
Installing Service Pack 1 for Visual Studio 2010 is highly recommended
|
||||
to avoid LNK1123 errors.
|
||||
|
||||
All you need to do to build is open the solution "pcbuild.sln" in Visual
|
||||
Studio, select the desired combination of configuration and platform,
|
||||
then build with "Build Solution" or the F7 keyboard shortcut. You can
|
||||
also build from the command line using the "build.bat" script in this
|
||||
directory. The solution is configured to build the projects in the
|
||||
correct order.
|
||||
|
||||
The solution currently supports two platforms. The Win32 platform is
|
||||
used to build standard x86-compatible 32-bit binaries, output into this
|
||||
directory. The x64 platform is used for building 64-bit AMD64 (aka
|
||||
x86_64 or EM64T) binaries, output into the amd64 sub-directory which
|
||||
will be created if it doesn't already exist. The Itanium (IA-64)
|
||||
platform is no longer supported. See the "Building for AMD64" section
|
||||
below for more information about 64-bit builds.
|
||||
|
||||
Four configuration options are supported by the solution:
|
||||
Debug
|
||||
Used to build Python with extra debugging capabilities, equivalent
|
||||
to using ./configure --with-pydebug on UNIX. All binaries built
|
||||
using this configuration have "_d" added to their name:
|
||||
python34_d.dll, python_d.exe, parser_d.pyd, and so on. Both the
|
||||
build and rt (run test) batch files in this directory accept a -d
|
||||
option for debug builds. If you are building Python to help with
|
||||
development of CPython, you will most likely use this configuration.
|
||||
PGInstrument, PGUpdate
|
||||
Used to build Python in Release configuration using PGO, which
|
||||
requires Premium Edition of Visual Studio. See the "Profile
|
||||
Guided Optimization" section below for more information. Build
|
||||
output from each of these configurations lands in its own
|
||||
sub-directory of this directory. The official Python releases are
|
||||
built using these configurations.
|
||||
Release
|
||||
Used to build Python as it is meant to be used in production
|
||||
settings, though without PGO.
|
||||
|
||||
|
||||
Legacy support
|
||||
--------------
|
||||
|
||||
You can find build directories for older versions of Visual Studio and
|
||||
Visual C++ in the PC directory. The legacy build directories are no
|
||||
longer actively maintained and may not work out of the box.
|
||||
|
||||
Currently, the only legacy build directory is PC\VS9.0, for Visual
|
||||
Studio 2008 (9.0).
|
||||
|
||||
|
||||
C Runtime
|
||||
---------
|
||||
|
||||
Visual Studio 2010 uses version 10 of the C runtime (MSVCRT10). The
|
||||
executables no longer use the "Side by Side" assemblies used in previous
|
||||
versions of the compiler. This simplifies distribution of applications.
|
||||
|
||||
The run time libraries are available under the VC/Redist folder of your
|
||||
Visual Studio distribution. For more info, see the Readme in the
|
||||
VC/Redist folder.
|
||||
|
||||
|
||||
Sub-Projects
|
||||
------------
|
||||
|
||||
The CPython project is split up into several smaller sub-projects which
|
||||
are managed by the pcbuild.sln solution file. Each sub-project is
|
||||
represented by a .vcxproj and a .vcxproj.filters file starting with the
|
||||
name of the sub-project. These sub-projects fall into a few general
|
||||
categories:
|
||||
|
||||
The following sub-projects represent the bare minimum required to build
|
||||
a functioning CPython interpreter. If nothing else builds but these,
|
||||
you'll have a very limited but usable python.exe:
|
||||
pythoncore
|
||||
.dll and .lib
|
||||
python
|
||||
.exe
|
||||
kill_python
|
||||
kill_python.exe, a small program designed to kill any instances of
|
||||
python(_d).exe that are running and live in the build output
|
||||
directory; this is meant to avoid build issues due to locked files
|
||||
make_buildinfo, make_versioninfo
|
||||
helpers to provide necessary information to the build process
|
||||
|
||||
These sub-projects provide extra executables that are useful for running
|
||||
CPython in different ways:
|
||||
pythonw
|
||||
pythonw.exe, a variant of python.exe that doesn't open a Command
|
||||
Prompt window
|
||||
pylauncher
|
||||
py.exe, the Python Launcher for Windows, see
|
||||
http://docs.python.org/3/using/windows.html#launcher
|
||||
pywlauncher
|
||||
pyw.exe, a variant of py.exe that doesn't open a Command Prompt
|
||||
window
|
||||
_testembed
|
||||
_testembed.exe, a small program that embeds Python for testing
|
||||
purposes, used by test_capi.py
|
||||
|
||||
These are miscellaneous sub-projects that don't really fit the other
|
||||
categories. By default, these projects do not build in Debug
|
||||
configuration:
|
||||
_freeze_importlib
|
||||
_freeze_importlib.exe, used to regenerate Python\importlib.h after
|
||||
changes have been made to Lib\importlib\_bootstrap.py
|
||||
bdist_wininst
|
||||
..\Lib\distutils\command\wininst-10.0[-amd64].exe, the base
|
||||
executable used by the distutils bdist_wininst command
|
||||
python3dll
|
||||
python3.dll, the PEP 384 Stable ABI dll
|
||||
xxlimited
|
||||
builds an example module that makes use of the PEP 384 Stable ABI,
|
||||
see Modules\xxlimited.c
|
||||
|
||||
The following sub-projects are for individual modules of the standard
|
||||
library which are implemented in C; each one builds a DLL (renamed to
|
||||
.pyd) of the same name as the project:
|
||||
_ctypes
|
||||
_ctypes_test
|
||||
_decimal
|
||||
_elementtree
|
||||
_hashlib
|
||||
_msi
|
||||
_multiprocessing
|
||||
_overlapped
|
||||
_socket
|
||||
_testcapi
|
||||
_testbuffer
|
||||
_testimportmultiple
|
||||
pyexpat
|
||||
select
|
||||
unicodedata
|
||||
winsound
|
||||
|
||||
The following Python-controlled sub-projects wrap external projects.
|
||||
Note that these external libraries are not necessary for a working
|
||||
interpreter, but they do implement several major features. See the
|
||||
"Getting External Sources" section below for additional information
|
||||
about getting the source for building these libraries. The sub-projects
|
||||
are:
|
||||
_bz2
|
||||
Python wrapper for version 1.0.6 of the libbzip2 compression library
|
||||
Homepage:
|
||||
http://www.bzip.org/
|
||||
_lzma
|
||||
Python wrapper for the liblzma compression library, using pre-built
|
||||
binaries of XZ Utils version 5.0.5
|
||||
Homepage:
|
||||
http://tukaani.org/xz/
|
||||
_ssl
|
||||
Python wrapper for version 1.0.2a of the OpenSSL secure sockets
|
||||
library, which is built by ssl.vcxproj
|
||||
Homepage:
|
||||
http://www.openssl.org/
|
||||
|
||||
Building OpenSSL requires nasm.exe (the Netwide Assembler), version
|
||||
2.10 or newer from
|
||||
http://www.nasm.us/
|
||||
to be somewhere on your PATH. More recent versions of OpenSSL may
|
||||
need a later version of NASM. If OpenSSL's self tests don't pass,
|
||||
you should first try to update NASM and do a full rebuild of
|
||||
OpenSSL. If you use the Tools\buildbot\external(-amd64).bat method
|
||||
for getting sources, it also downloads a version of NASM which the
|
||||
ssl build script will add to PATH.
|
||||
|
||||
If you like to use the official sources instead of the files from
|
||||
python.org's subversion repository, Perl is required to build the
|
||||
necessary makefiles and assembly files. ActivePerl is available
|
||||
from
|
||||
http://www.activestate.com/activeperl/
|
||||
The svn.python.org version contains pre-built makefiles and assembly
|
||||
files.
|
||||
|
||||
The build process makes sure that no patented algorithms are
|
||||
included. For now RC5, MDC2 and IDEA are excluded from the build.
|
||||
You may have to manually remove $(OBJ_D)\i_*.obj from ms\nt.mak if
|
||||
using official sources; the svn.python.org-hosted version is already
|
||||
fixed.
|
||||
|
||||
The ssl.vcxproj sub-project simply invokes PCbuild/build_ssl.py,
|
||||
which locates and builds OpenSSL.
|
||||
|
||||
build_ssl.py attempts to catch the most common errors (such as not
|
||||
being able to find OpenSSL sources, or not being able to find a Perl
|
||||
that works with OpenSSL) and give a reasonable error message. If
|
||||
you have a problem that doesn't seem to be handled correctly (e.g.,
|
||||
you know you have ActivePerl but we can't find it), please take a
|
||||
peek at build_ssl.py and suggest patches. Note that build_ssl.py
|
||||
should be able to be run directly from the command-line.
|
||||
|
||||
The ssl sub-project does not have the ability to clean the OpenSSL
|
||||
build; if you need to rebuild, you'll have to clean it by hand.
|
||||
_sqlite3
|
||||
Wraps SQLite 3.8.3.1, which is itself built by sqlite3.vcxproj
|
||||
Homepage:
|
||||
http://www.sqlite.org/
|
||||
_tkinter
|
||||
Wraps version 8.6.1 of the Tk windowing system.
|
||||
Homepage:
|
||||
http://www.tcl.tk/
|
||||
|
||||
Unlike the other external libraries listed above, Tk must be built
|
||||
separately before the _tkinter module can be built. This means that
|
||||
a pre-built Tcl/Tk installation is expected in ..\externals\tcltk
|
||||
(tcltk64 for 64-bit) relative to this directory. See "Getting
|
||||
External Sources" below for the easiest method to ensure Tcl/Tk is
|
||||
built.
|
||||
|
||||
|
||||
Getting External Sources
|
||||
------------------------
|
||||
|
||||
The last category of sub-projects listed above wrap external projects
|
||||
Python doesn't control, and as such a little more work is required in
|
||||
order to download the relevant source files for each project before they
|
||||
can be built. The buildbots must ensure that all libraries are present
|
||||
before building, so the easiest approach is to run either external.bat
|
||||
or external-amd64.bat (depending on platform) in the ..\Tools\buildbot
|
||||
directory from ..\, i.e.:
|
||||
|
||||
C:\python\cpython\PCbuild>cd ..
|
||||
C:\python\cpython>Tools\buildbot\external.bat
|
||||
|
||||
This extracts all the external sub-projects from
|
||||
http://svn.python.org/projects/external
|
||||
via Subversion (so you'll need an svn.exe on your PATH) and places them
|
||||
in ..\externals (relative to this directory).
|
||||
|
||||
It is also possible to download sources from each project's homepage,
|
||||
though you may have to change the names of some folders in order to make
|
||||
things work. For instance, if you were to download a version 5.0.7 of
|
||||
XZ Utils, you would need to extract the archive into ..\externals\xz-5.0.5
|
||||
anyway, since that is where the solution is set to look for xz. The
|
||||
same is true for all other external projects.
|
||||
|
||||
The external(-amd64).bat scripts will also build a debug build of
|
||||
Tcl/Tk, but there aren't any equivalent batch files for building release
|
||||
versions of Tcl/Tk currently available. If you need to build a release
|
||||
version of Tcl/Tk, just take a look at the relevant external(-amd64).bat
|
||||
file and find the two nmake lines, then call each one without the
|
||||
'DEBUG=1' parameter, i.e.:
|
||||
|
||||
The external-amd64.bat file contains this for tcl:
|
||||
nmake -f makefile.vc DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 clean all install
|
||||
|
||||
So for a release build, you'd call it as:
|
||||
nmake -f makefile.vc MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 clean all install
|
||||
|
||||
Note that the above command is called from within ..\externals\tcl-8.6.1.0\win
|
||||
(relative to this directory); don't forget to build Tk as well as Tcl!
|
||||
|
||||
This will be cleaned up in the future; http://bugs.python.org/issue15968
|
||||
tracks adding a new tcltk.vcxproj file that will build Tcl/Tk and Tix
|
||||
the same way the other external projects listed above are built.
|
||||
|
||||
|
||||
Building for AMD64
|
||||
------------------
|
||||
|
||||
The build process for AMD64 / x64 is very similar to standard builds,
|
||||
you just have to set x64 as platform. In addition, the HOST_PYTHON
|
||||
environment variable must point to a Python interpreter (at least 2.4),
|
||||
to support cross-compilation from Win32. Note that Visual Studio
|
||||
requires Professional Edition or better in order to build 64-bit
|
||||
binaries.
|
||||
|
||||
|
||||
Profile Guided Optimization
|
||||
---------------------------
|
||||
|
||||
The solution has two configurations for PGO. The PGInstrument
|
||||
configuration must be built first. The PGInstrument binaries are linked
|
||||
against a profiling library and contain extra debug information. The
|
||||
PGUpdate configuration takes the profiling data and generates optimized
|
||||
binaries.
|
||||
|
||||
The build_pgo.bat script automates the creation of optimized binaries.
|
||||
It creates the PGI files, runs the unit test suite or PyBench with the
|
||||
PGI python, and finally creates the optimized files.
|
||||
|
||||
See
|
||||
http://msdn.microsoft.com/en-us/library/e7k32f4k(VS.100).aspx
|
||||
for more on this topic.
|
||||
|
||||
|
||||
Static library
|
||||
--------------
|
||||
|
||||
The solution has no configuration for static libraries. However it is
|
||||
easy to build a static library instead of a DLL. You simply have to set
|
||||
the "Configuration Type" to "Static Library (.lib)" and alter the
|
||||
preprocessor macro "Py_ENABLE_SHARED" to "Py_NO_ENABLE_SHARED". You may
|
||||
also have to change the "Runtime Library" from "Multi-threaded DLL
|
||||
(/MD)" to "Multi-threaded (/MT)".
|
||||
|
||||
|
||||
Visual Studio properties
|
||||
------------------------
|
||||
|
||||
The PCbuild solution makes heavy use of Visual Studio property files
|
||||
(*.props). The properties can be viewed and altered in the Property
|
||||
Manager (View -> Other Windows -> Property Manager).
|
||||
|
||||
The property files used are (+-- = "also imports"):
|
||||
* debug (debug macro: _DEBUG)
|
||||
* pginstrument (PGO)
|
||||
* pgupdate (PGO)
|
||||
+-- pginstrument
|
||||
* pyd (python extension, release build)
|
||||
+-- release
|
||||
+-- pyproject
|
||||
* pyd_d (python extension, debug build)
|
||||
+-- debug
|
||||
+-- pyproject
|
||||
* pyproject (base settings for all projects, user macros like PyDllName)
|
||||
* release (release macro: NDEBUG)
|
||||
* sqlite3 (used only by sqlite3.vcxproj)
|
||||
* x64 (AMD64 / x64 platform specific settings)
|
||||
|
||||
The pyproject property file defines _WIN32 and x64 defines _WIN64 and
|
||||
_M_X64 although the macros are set by the compiler, too. The GUI doesn't
|
||||
always know about the macros and confuse the user with false
|
||||
information.
|
||||
|
||||
|
||||
Your Own Extension DLLs
|
||||
-----------------------
|
||||
|
||||
If you want to create your own extension module DLL (.pyd), there's an
|
||||
example with easy-to-follow instructions in ..\PC\example\; read the
|
||||
file readme.txt there first.
|
||||
|
|
|
|||
116
PCbuild/rt.bat
116
PCbuild/rt.bat
|
|
@ -1,58 +1,58 @@
|
|||
@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 .py[co] files reachable from Lib/.
|
||||
rem -q runs the tests just once, and without deleting .py[co] 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 is passed to regrtest.py. 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 prefix=.\
|
||||
set suffix=
|
||||
set qmode=
|
||||
set dashO=
|
||||
set tcltk=tcltk
|
||||
|
||||
: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=amd64) & (set tcltk=tcltk64) & shift & goto CheckOpts
|
||||
|
||||
PATH %PATH%;%~dp0..\externals\%tcltk%\bin
|
||||
set exe=%prefix%\python%suffix%
|
||||
set cmd=%exe% %dashO% -Wd -E -bb ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||
if defined qmode goto Qmode
|
||||
|
||||
echo Deleting .pyc/.pyo files ...
|
||||
%exe% rmpyc.py
|
||||
|
||||
echo on
|
||||
%cmd%
|
||||
@echo off
|
||||
|
||||
echo About to run again without deleting .pyc/.pyo 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 .py[co] files reachable from Lib/.
|
||||
rem -q runs the tests just once, and without deleting .py[co] 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 is passed to regrtest.py. 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 prefix=.\
|
||||
set suffix=
|
||||
set qmode=
|
||||
set dashO=
|
||||
set tcltk=tcltk
|
||||
|
||||
: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=amd64) & (set tcltk=tcltk64) & shift & goto CheckOpts
|
||||
|
||||
PATH %PATH%;%~dp0..\externals\%tcltk%\bin
|
||||
set exe=%prefix%\python%suffix%
|
||||
set cmd=%exe% %dashO% -Wd -E -bb ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||
if defined qmode goto Qmode
|
||||
|
||||
echo Deleting .pyc/.pyo files ...
|
||||
%exe% rmpyc.py
|
||||
|
||||
echo on
|
||||
%cmd%
|
||||
@echo off
|
||||
|
||||
echo About to run again without deleting .pyc/.pyo first:
|
||||
pause
|
||||
|
||||
:Qmode
|
||||
echo on
|
||||
%cmd%
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
@rem Used by the buildbot "compile" step.
|
||||
cmd /c Tools\buildbot\external-amd64.bat
|
||||
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
|
||||
cmd /c Tools\buildbot\clean-amd64.bat
|
||||
|
||||
msbuild PCbuild\pcbuild.sln /p:Configuration=Debug /p:Platform=x64
|
||||
@rem Used by the buildbot "compile" step.
|
||||
cmd /c Tools\buildbot\external-amd64.bat
|
||||
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
|
||||
cmd /c Tools\buildbot\clean-amd64.bat
|
||||
|
||||
msbuild PCbuild\pcbuild.sln /p:Configuration=Debug /p:Platform=x64
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@rem Used by the buildbot "compile" step.
|
||||
cmd /c Tools\buildbot\external.bat
|
||||
call "%VS100COMNTOOLS%vsvars32.bat"
|
||||
cmd /c Tools\buildbot\clean.bat
|
||||
|
||||
msbuild PCbuild\pcbuild.sln /p:Configuration=Debug /p:Platform=Win32
|
||||
|
||||
@rem Used by the buildbot "compile" step.
|
||||
cmd /c Tools\buildbot\external.bat
|
||||
call "%VS100COMNTOOLS%vsvars32.bat"
|
||||
cmd /c Tools\buildbot\clean.bat
|
||||
|
||||
msbuild PCbuild\pcbuild.sln /p:Configuration=Debug /p:Platform=Win32
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
@rem Used by the buildbot "buildmsi" step.
|
||||
|
||||
cmd /c Tools\buildbot\external.bat
|
||||
@rem build release versions of things
|
||||
call "%VS100COMNTOOLS%vsvars32.bat"
|
||||
|
||||
@rem build Python
|
||||
msbuild /p:useenv=true PCbuild\pcbuild.sln /p:Configuration=Release /p:Platform=Win32
|
||||
|
||||
@rem build the documentation
|
||||
bash.exe -c 'cd Doc;make PYTHON=python2.5 update htmlhelp'
|
||||
"%ProgramFiles%\HTML Help Workshop\hhc.exe" Doc\build\htmlhelp\python26a3.hhp
|
||||
|
||||
@rem build the MSI file
|
||||
cd PC
|
||||
nmake /f icons.mak
|
||||
cd ..\Tools\msi
|
||||
del *.msi
|
||||
nmake /f msisupport.mak
|
||||
%HOST_PYTHON% msi.py
|
||||
|
||||
@rem Used by the buildbot "buildmsi" step.
|
||||
|
||||
cmd /c Tools\buildbot\external.bat
|
||||
@rem build release versions of things
|
||||
call "%VS100COMNTOOLS%vsvars32.bat"
|
||||
|
||||
@rem build Python
|
||||
msbuild /p:useenv=true PCbuild\pcbuild.sln /p:Configuration=Release /p:Platform=Win32
|
||||
|
||||
@rem build the documentation
|
||||
bash.exe -c 'cd Doc;make PYTHON=python2.5 update htmlhelp'
|
||||
"%ProgramFiles%\HTML Help Workshop\hhc.exe" Doc\build\htmlhelp\python26a3.hhp
|
||||
|
||||
@rem build the MSI file
|
||||
cd PC
|
||||
nmake /f icons.mak
|
||||
cd ..\Tools\msi
|
||||
del *.msi
|
||||
nmake /f msisupport.mak
|
||||
%HOST_PYTHON% msi.py
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
@rem Used by the buildbot "clean" step.
|
||||
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
|
||||
@echo Deleting .pyc/.pyo files ...
|
||||
del /s Lib\*.pyc Lib\*.pyo
|
||||
@echo Deleting test leftovers ...
|
||||
rmdir /s /q build
|
||||
cd PCbuild
|
||||
msbuild /target:clean pcbuild.sln /p:Configuration=Release /p:PlatformTarget=x64
|
||||
msbuild /target:clean pcbuild.sln /p:Configuration=Debug /p:PlatformTarget=x64
|
||||
cd ..
|
||||
@rem Used by the buildbot "clean" step.
|
||||
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
|
||||
@echo Deleting .pyc/.pyo files ...
|
||||
del /s Lib\*.pyc Lib\*.pyo
|
||||
@echo Deleting test leftovers ...
|
||||
rmdir /s /q build
|
||||
cd PCbuild
|
||||
msbuild /target:clean pcbuild.sln /p:Configuration=Release /p:PlatformTarget=x64
|
||||
msbuild /target:clean pcbuild.sln /p:Configuration=Debug /p:PlatformTarget=x64
|
||||
cd ..
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
@rem Used by the buildbot "clean" step.
|
||||
call "%VS100COMNTOOLS%vsvars32.bat"
|
||||
@echo Deleting test leftovers ...
|
||||
rmdir /s /q build
|
||||
cd PCbuild
|
||||
msbuild /target:clean pcbuild.sln /p:Configuration=Release /p:PlatformTarget=x86
|
||||
msbuild /target:clean pcbuild.sln /p:Configuration=Debug /p:PlatformTarget=x86
|
||||
cd ..
|
||||
@rem Used by the buildbot "clean" step.
|
||||
call "%VS100COMNTOOLS%vsvars32.bat"
|
||||
@echo Deleting test leftovers ...
|
||||
rmdir /s /q build
|
||||
cd PCbuild
|
||||
msbuild /target:clean pcbuild.sln /p:Configuration=Release /p:PlatformTarget=x86
|
||||
msbuild /target:clean pcbuild.sln /p:Configuration=Debug /p:PlatformTarget=x86
|
||||
cd ..
|
||||
|
|
|
|||
|
|
@ -1,28 +1,28 @@
|
|||
@rem Fetches (and builds if necessary) external dependencies
|
||||
|
||||
@rem Assume we start inside the Python source directory
|
||||
call "Tools\buildbot\external-common.bat"
|
||||
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
|
||||
|
||||
if not exist tcltk64\bin\tcl86tg.dll (
|
||||
cd tcl-8.6.1.0\win
|
||||
nmake -f makefile.vc OPTS=symbols MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 clean core shell dlls
|
||||
nmake -f makefile.vc OPTS=symbols MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 install-binaries install-libraries
|
||||
cd ..\..
|
||||
)
|
||||
|
||||
if not exist tcltk64\bin\tk86tg.dll (
|
||||
cd tk-8.6.1.0\win
|
||||
nmake -f makefile.vc OPTS=symbols MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.6.1.0 clean
|
||||
nmake -f makefile.vc OPTS=symbols MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.6.1.0 all
|
||||
nmake -f makefile.vc OPTS=symbols MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.6.1.0 install-binaries install-libraries
|
||||
cd ..\..
|
||||
)
|
||||
|
||||
if not exist tcltk64\lib\tix8.4.3\tix84g.dll (
|
||||
cd tix-8.4.3.4\win
|
||||
nmake -f python.mak DEBUG=1 MACHINE=AMD64 TCL_DIR=..\..\tcl-8.6.1.0 TK_DIR=..\..\tk-8.6.1.0 INSTALL_DIR=..\..\tcltk64 clean
|
||||
nmake -f python.mak DEBUG=1 MACHINE=AMD64 TCL_DIR=..\..\tcl-8.6.1.0 TK_DIR=..\..\tk-8.6.1.0 INSTALL_DIR=..\..\tcltk64 all
|
||||
nmake -f python.mak DEBUG=1 MACHINE=AMD64 TCL_DIR=..\..\tcl-8.6.1.0 TK_DIR=..\..\tk-8.6.1.0 INSTALL_DIR=..\..\tcltk64 install
|
||||
cd ..\..
|
||||
)
|
||||
@rem Fetches (and builds if necessary) external dependencies
|
||||
|
||||
@rem Assume we start inside the Python source directory
|
||||
call "Tools\buildbot\external-common.bat"
|
||||
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
|
||||
|
||||
if not exist tcltk64\bin\tcl86tg.dll (
|
||||
cd tcl-8.6.1.0\win
|
||||
nmake -f makefile.vc OPTS=symbols MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 clean core shell dlls
|
||||
nmake -f makefile.vc OPTS=symbols MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 install-binaries install-libraries
|
||||
cd ..\..
|
||||
)
|
||||
|
||||
if not exist tcltk64\bin\tk86tg.dll (
|
||||
cd tk-8.6.1.0\win
|
||||
nmake -f makefile.vc OPTS=symbols MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.6.1.0 clean
|
||||
nmake -f makefile.vc OPTS=symbols MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.6.1.0 all
|
||||
nmake -f makefile.vc OPTS=symbols MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.6.1.0 install-binaries install-libraries
|
||||
cd ..\..
|
||||
)
|
||||
|
||||
if not exist tcltk64\lib\tix8.4.3\tix84g.dll (
|
||||
cd tix-8.4.3.4\win
|
||||
nmake -f python.mak DEBUG=1 MACHINE=AMD64 TCL_DIR=..\..\tcl-8.6.1.0 TK_DIR=..\..\tk-8.6.1.0 INSTALL_DIR=..\..\tcltk64 clean
|
||||
nmake -f python.mak DEBUG=1 MACHINE=AMD64 TCL_DIR=..\..\tcl-8.6.1.0 TK_DIR=..\..\tk-8.6.1.0 INSTALL_DIR=..\..\tcltk64 all
|
||||
nmake -f python.mak DEBUG=1 MACHINE=AMD64 TCL_DIR=..\..\tcl-8.6.1.0 TK_DIR=..\..\tk-8.6.1.0 INSTALL_DIR=..\..\tcltk64 install
|
||||
cd ..\..
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,54 +1,54 @@
|
|||
@rem Common file shared between external.bat and external-amd64.bat. Responsible for
|
||||
@rem fetching external components into the root\.. buildbot directories.
|
||||
|
||||
if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/
|
||||
|
||||
if not exist externals mkdir externals
|
||||
cd externals
|
||||
@rem XXX: If you need to force the buildbots to start from a fresh environment, uncomment
|
||||
@rem the following, check it in, then check it out, comment it out, then check it back in.
|
||||
@rem if exist bzip2-1.0.6 rd /s/q bzip2-1.0.6
|
||||
@rem if exist tcltk rd /s/q tcltk
|
||||
@rem if exist tcltk64 rd /s/q tcltk64
|
||||
@rem if exist tcl-8.6.1.0 rd /s/q tcl-8.6.1.0
|
||||
@rem if exist tk-8.6.1.0 rd /s/q tk-8.6.1.0
|
||||
@rem if exist tix-8.4.3.4 rd /s/q tix-8.4.3.4
|
||||
@rem if exist db-4.4.20 rd /s/q db-4.4.20
|
||||
@rem if exist openssl-1.0.2a rd /s/q openssl-1.0.2a
|
||||
@rem if exist sqlite-3.7.12 rd /s/q sqlite-3.7.12
|
||||
|
||||
@rem bzip
|
||||
if not exist bzip2-1.0.6 (
|
||||
rd /s/q bzip2-1.0.5
|
||||
svn export %SVNROOT%bzip2-1.0.6
|
||||
)
|
||||
|
||||
@rem NASM, for OpenSSL build
|
||||
@rem if exist nasm-2.11.06 rd /s/q nasm-2.11.06
|
||||
if not exist nasm-2.11.06 svn export %SVNROOT%nasm-2.11.06
|
||||
|
||||
@rem OpenSSL
|
||||
if not exist openssl-1.0.2a (
|
||||
rd /s/q openssl-1.0.1l
|
||||
svn export %SVNROOT%openssl-1.0.2a
|
||||
)
|
||||
|
||||
@rem tcl/tk
|
||||
if not exist tcl-8.6.1.0 (
|
||||
rd /s/q tcltk tcltk64 tcl-8.5.11.0 tk-8.5.11.0
|
||||
svn export %SVNROOT%tcl-8.6.1.0
|
||||
)
|
||||
if not exist tk-8.6.1.0 svn export %SVNROOT%tk-8.6.1.0
|
||||
if not exist tix-8.4.3.4 svn export %SVNROOT%tix-8.4.3.4
|
||||
|
||||
@rem sqlite3
|
||||
if not exist sqlite-3.8.3.1 (
|
||||
rd /s/q sqlite-source-3.8.1
|
||||
svn export %SVNROOT%sqlite-3.8.3.1
|
||||
)
|
||||
|
||||
@rem lzma
|
||||
if not exist xz-5.0.5 (
|
||||
rd /s/q xz-5.0.3
|
||||
svn export %SVNROOT%xz-5.0.5
|
||||
)
|
||||
@rem Common file shared between external.bat and external-amd64.bat. Responsible for
|
||||
@rem fetching external components into the root\.. buildbot directories.
|
||||
|
||||
if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/
|
||||
|
||||
if not exist externals mkdir externals
|
||||
cd externals
|
||||
@rem XXX: If you need to force the buildbots to start from a fresh environment, uncomment
|
||||
@rem the following, check it in, then check it out, comment it out, then check it back in.
|
||||
@rem if exist bzip2-1.0.6 rd /s/q bzip2-1.0.6
|
||||
@rem if exist tcltk rd /s/q tcltk
|
||||
@rem if exist tcltk64 rd /s/q tcltk64
|
||||
@rem if exist tcl-8.6.1.0 rd /s/q tcl-8.6.1.0
|
||||
@rem if exist tk-8.6.1.0 rd /s/q tk-8.6.1.0
|
||||
@rem if exist tix-8.4.3.4 rd /s/q tix-8.4.3.4
|
||||
@rem if exist db-4.4.20 rd /s/q db-4.4.20
|
||||
@rem if exist openssl-1.0.2a rd /s/q openssl-1.0.2a
|
||||
@rem if exist sqlite-3.7.12 rd /s/q sqlite-3.7.12
|
||||
|
||||
@rem bzip
|
||||
if not exist bzip2-1.0.6 (
|
||||
rd /s/q bzip2-1.0.5
|
||||
svn export %SVNROOT%bzip2-1.0.6
|
||||
)
|
||||
|
||||
@rem NASM, for OpenSSL build
|
||||
@rem if exist nasm-2.11.06 rd /s/q nasm-2.11.06
|
||||
if not exist nasm-2.11.06 svn export %SVNROOT%nasm-2.11.06
|
||||
|
||||
@rem OpenSSL
|
||||
if not exist openssl-1.0.2a (
|
||||
rd /s/q openssl-1.0.1l
|
||||
svn export %SVNROOT%openssl-1.0.2a
|
||||
)
|
||||
|
||||
@rem tcl/tk
|
||||
if not exist tcl-8.6.1.0 (
|
||||
rd /s/q tcltk tcltk64 tcl-8.5.11.0 tk-8.5.11.0
|
||||
svn export %SVNROOT%tcl-8.6.1.0
|
||||
)
|
||||
if not exist tk-8.6.1.0 svn export %SVNROOT%tk-8.6.1.0
|
||||
if not exist tix-8.4.3.4 svn export %SVNROOT%tix-8.4.3.4
|
||||
|
||||
@rem sqlite3
|
||||
if not exist sqlite-3.8.3.1 (
|
||||
rd /s/q sqlite-source-3.8.1
|
||||
svn export %SVNROOT%sqlite-3.8.3.1
|
||||
)
|
||||
|
||||
@rem lzma
|
||||
if not exist xz-5.0.5 (
|
||||
rd /s/q xz-5.0.3
|
||||
svn export %SVNROOT%xz-5.0.5
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,29 +1,29 @@
|
|||
@rem Fetches (and builds if necessary) external dependencies
|
||||
|
||||
@rem Assume we start inside the Python source directory
|
||||
call "Tools\buildbot\external-common.bat"
|
||||
call "%VS100COMNTOOLS%\vsvars32.bat"
|
||||
|
||||
if not exist tcltk\bin\tcl86tg.dll (
|
||||
@rem all and install need to be separate invocations, otherwise nmakehlp is not found on install
|
||||
cd tcl-8.6.1.0\win
|
||||
nmake -f makefile.vc OPTS=symbols INSTALLDIR=..\..\tcltk clean core shell dlls
|
||||
nmake -f makefile.vc OPTS=symbols INSTALLDIR=..\..\tcltk install-binaries install-libraries
|
||||
cd ..\..
|
||||
)
|
||||
|
||||
if not exist tcltk\bin\tk86tg.dll (
|
||||
cd tk-8.6.1.0\win
|
||||
nmake -f makefile.vc OPTS=symbols INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.6.1.0 clean
|
||||
nmake -f makefile.vc OPTS=symbols INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.6.1.0 all
|
||||
nmake -f makefile.vc OPTS=symbols INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.6.1.0 install-binaries install-libraries
|
||||
cd ..\..
|
||||
)
|
||||
|
||||
if not exist tcltk\lib\tix8.4.3\tix84g.dll (
|
||||
cd tix-8.4.3.4\win
|
||||
nmake -f python.mak DEBUG=1 MACHINE=IX86 TCL_DIR=..\..\tcl-8.6.1.0 TK_DIR=..\..\tk-8.6.1.0 INSTALL_DIR=..\..\tcltk clean
|
||||
nmake -f python.mak DEBUG=1 MACHINE=IX86 TCL_DIR=..\..\tcl-8.6.1.0 TK_DIR=..\..\tk-8.6.1.0 INSTALL_DIR=..\..\tcltk all
|
||||
nmake -f python.mak DEBUG=1 MACHINE=IX86 TCL_DIR=..\..\tcl-8.6.1.0 TK_DIR=..\..\tk-8.6.1.0 INSTALL_DIR=..\..\tcltk install
|
||||
cd ..\..
|
||||
)
|
||||
@rem Fetches (and builds if necessary) external dependencies
|
||||
|
||||
@rem Assume we start inside the Python source directory
|
||||
call "Tools\buildbot\external-common.bat"
|
||||
call "%VS100COMNTOOLS%\vsvars32.bat"
|
||||
|
||||
if not exist tcltk\bin\tcl86tg.dll (
|
||||
@rem all and install need to be separate invocations, otherwise nmakehlp is not found on install
|
||||
cd tcl-8.6.1.0\win
|
||||
nmake -f makefile.vc OPTS=symbols INSTALLDIR=..\..\tcltk clean core shell dlls
|
||||
nmake -f makefile.vc OPTS=symbols INSTALLDIR=..\..\tcltk install-binaries install-libraries
|
||||
cd ..\..
|
||||
)
|
||||
|
||||
if not exist tcltk\bin\tk86tg.dll (
|
||||
cd tk-8.6.1.0\win
|
||||
nmake -f makefile.vc OPTS=symbols INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.6.1.0 clean
|
||||
nmake -f makefile.vc OPTS=symbols INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.6.1.0 all
|
||||
nmake -f makefile.vc OPTS=symbols INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.6.1.0 install-binaries install-libraries
|
||||
cd ..\..
|
||||
)
|
||||
|
||||
if not exist tcltk\lib\tix8.4.3\tix84g.dll (
|
||||
cd tix-8.4.3.4\win
|
||||
nmake -f python.mak DEBUG=1 MACHINE=IX86 TCL_DIR=..\..\tcl-8.6.1.0 TK_DIR=..\..\tk-8.6.1.0 INSTALL_DIR=..\..\tcltk clean
|
||||
nmake -f python.mak DEBUG=1 MACHINE=IX86 TCL_DIR=..\..\tcl-8.6.1.0 TK_DIR=..\..\tk-8.6.1.0 INSTALL_DIR=..\..\tcltk all
|
||||
nmake -f python.mak DEBUG=1 MACHINE=IX86 TCL_DIR=..\..\tcl-8.6.1.0 TK_DIR=..\..\tk-8.6.1.0 INSTALL_DIR=..\..\tcltk install
|
||||
cd ..\..
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
@rem Used by the buildbot "test" step.
|
||||
cd PCbuild
|
||||
call rt.bat -d -q -x64 -uall -rwW -n --timeout=3600 %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||
@rem Used by the buildbot "test" step.
|
||||
cd PCbuild
|
||||
call rt.bat -d -q -x64 -uall -rwW -n --timeout=3600 %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
@rem Used by the buildbot "test" step.
|
||||
cd PCbuild
|
||||
call rt.bat -d -q -uall -rwW -n --timeout=3600 %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||
@rem Used by the buildbot "test" step.
|
||||
cd PCbuild
|
||||
call rt.bat -d -q -uall -rwW -n --timeout=3600 %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue