From: Zachary Ware Date: Sun, 2 Nov 2014 03:48:24 +0000 (-0500) Subject: Issue #17896: Move Windows external lib sources from .. to externals. X-Git-Tag: v3.5.0a1~539 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=740e1dcdc22027899cd3e88c2bdc99af8071a805;p=thirdparty%2FPython%2Fcpython.git Issue #17896: Move Windows external lib sources from .. to externals. --- 740e1dcdc22027899cd3e88c2bdc99af8071a805 diff --cc .hgignore index 562dac96f837,9e5a583361a1..e22a8f7c4ca4 --- a/.hgignore +++ b/.hgignore @@@ -89,10 -88,11 +89,11 @@@ Tools/unicode/build Tools/unicode/MAPPINGS/ BuildLog.htm __pycache__ -Modules/_freeze_importlib -Modules/_testembed +Programs/_freeze_importlib +Programs/_testembed .coverage coverage/ + externals/ htmlcov/ *.gcda *.gcno diff --cc Misc/NEWS index 3f62b97e2f77,8a5ca3086122..56e1da49f201 --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -1382,18 -980,6 +1382,21 @@@ Tools/Demo - Issue #20535: PYTHONWARNING no longer affects the run_tests.py script. Patch by Arfrever Frehtes Taifersar Arahesis. +Windows +------- + ++- Issue #17896: The Windows build scripts now expect external library sources ++ to be in ``PCbuild\..\externals`` rather than ``PCbuild\..\..``. ++ +- Issue #17717: The Windows build scripts now use a copy of NASM pulled from + svn.python.org to build OpenSSL. + +- Issue #21907: Improved the batch scripts provided for building Python. + +- Issue #22644: The bundled version of OpenSSL has been updated to 1.0.1j. + +- Issue #10747: Use versioned labels in the Windows start menu. + Patch by Olive Kilburn. What's New in Python 3.4.0? =========================== diff --cc PCbuild/get_externals.bat index 662bfcfa9a38,000000000000..c655f6ffda33 mode 100644,000000..100644 --- a/PCbuild/get_externals.bat +++ b/PCbuild/get_externals.bat @@@ -1,102 -1,0 +1,103 @@@ +@echo off +setlocal +rem Simple script to fetch source for external libraries + - pushd "%~dp0..\.." ++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... + +for %%e in ( + bzip2-1.0.6 + nasm-2.11.06 + openssl-1.0.1j + tcl-8.6.1.0 + tk-8.6.1.0 + tix-8.4.3.4 + sqlite-3.8.3.1 + xz-5.0.5 + ) do ( + if exist %%e ( + echo.%%e already exists, skipping. + ) else ( + echo.Fetching %%e... + svn export %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 diff --cc PCbuild/pyproject.props index c7087cc4e0c4,52ff2c518d1b..93d69d03a24a --- a/PCbuild/pyproject.props +++ b/PCbuild/pyproject.props @@@ -13,10 -13,10 +13,10 @@@ $(SolutionDir)$(PlatformName)-temp-$(Configuration)\$(ProjectName)\ - python34$(PyDebugExt) + python35$(PyDebugExt) $(OutDir)python$(PyDebugExt).exe $(OutDir)kill_python$(PyDebugExt).exe - ..\.. + ..\externals $(externalsDir)\sqlite-3.8.3.1 $(externalsDir)\bzip2-1.0.6 $(externalsDir)\xz-5.0.5 diff --cc PCbuild/readme.txt index 535ea00a5141,018bdf0e50c0..91ef8d17fd53 --- a/PCbuild/readme.txt +++ b/PCbuild/readme.txt @@@ -273,18 -236,45 +273,18 @@@ Getting External Source 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 +can be built. However, a simple script is provided to make this as +painless as possible, called "get_externals.bat" and located in this +directory. This script 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 +via Subversion (so you'll need svn.exe on your PATH) and places them - in ..\.. (relative to this directory). + 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. +though you may have to change folder names or pass the names to MSBuild +as the values of certain properties in order for the build solution to +find them. This is an advanced topic and not necessarily fully +supported. Building for AMD64 diff --cc Tools/buildbot/test-amd64.bat index 2441e01f2477,de64f25fbec3..7a241f50ab9b --- a/Tools/buildbot/test-amd64.bat +++ b/Tools/buildbot/test-amd64.bat @@@ -1,7 -1,3 +1,7 @@@ @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 + +setlocal +rem The following line should be removed before #20035 is closed - set TCL_LIBRARY=%~dp0..\..\..\tcltk64\lib\tcl8.6 ++set TCL_LIBRARY=%~dp0..\..\externals\tcltk64\lib\tcl8.6 + +call "%~dp0..\..\PCbuild\rt.bat" -d -q -x64 -uall -rwW -n --timeout=3600 %* diff --cc Tools/buildbot/test.bat index 1fa0ad94dbea,4e4db10d7ece..6a6448c3ae89 --- a/Tools/buildbot/test.bat +++ b/Tools/buildbot/test.bat @@@ -1,7 -1,3 +1,7 @@@ @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 + +setlocal +rem The following line should be removed before #20035 is closed - set TCL_LIBRARY=%~dp0..\..\..\tcltk\lib\tcl8.6 ++set TCL_LIBRARY=%~dp0..\..\externals\tcltk\lib\tcl8.6 + +call "%~dp0..\..\PCbuild\rt.bat" -d -q -uall -rwW -n --timeout=3600 %*