summaryrefslogtreecommitdiff
path: root/PCbuild
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2015-09-04 01:08:07 -0500
committerZachary Ware <zachary.ware@gmail.com>2015-09-04 01:08:07 -0500
commiteb49ccfdb78152e817138ae2ec35bf427576df51 (patch)
tree8b719182ed94a4f74b4a32c09e6c95e6c48a654f /PCbuild
parent1db43f98d525ab108160f92b67c8851080507804 (diff)
downloadcpython-git-eb49ccfdb78152e817138ae2ec35bf427576df51.tar.gz
Issue #24986: Save some bandwidth from svn.python.org
Don't download sources that won't be used.
Diffstat (limited to 'PCbuild')
-rw-r--r--PCbuild/build.bat4
-rw-r--r--PCbuild/get_externals.bat21
2 files changed, 14 insertions, 11 deletions
diff --git a/PCbuild/build.bat b/PCbuild/build.bat
index 70d88ea08e..f3dcc91eab 100644
--- a/PCbuild/build.bat
+++ b/PCbuild/build.bat
@@ -65,7 +65,7 @@ if "%~1"=="-k" (set kill=true) & shift & goto CheckOpts
rem These use the actual property names used by MSBuild. We could just let
rem them in through the environment, but we specify them on the command line
rem anyway for visibility so set defaults after this
-if "%~1"=="-e" (set IncludeExternals=true) & call "%dir%get_externals.bat" & shift & goto CheckOpts
+if "%~1"=="-e" (set IncludeExternals=true) & shift & goto CheckOpts
if "%~1"=="--no-ssl" (set IncludeSSL=false) & shift & goto CheckOpts
if "%~1"=="--no-tkinter" (set IncludeTkinter=false) & shift & goto CheckOpts
if "%~1"=="--no-bsddb" (set IncludeBsddb=false) & shift & goto CheckOpts
@@ -75,6 +75,8 @@ if "%IncludeSSL%"=="" set IncludeSSL=true
if "%IncludeTkinter%"=="" set IncludeTkinter=true
if "%IncludeBsddb%"=="" set IncludeBsddb=true
+if "%IncludeExternals%"=="true" call "%dir%get_externals.bat"
+
if "%platf%"=="x64" (set vs_platf=x86_amd64)
rem Setup the environment
diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat
index a2aea9d0df..ffd1a16216 100644
--- a/PCbuild/get_externals.bat
+++ b/PCbuild/get_externals.bat
@@ -54,16 +54,17 @@ echo.Fetching external libraries...
rem When updating these versions, remember to update the relevant property
rem files in both this dir and PC\VS9.0
-for %%e in (
- bzip2-1.0.6
- db-4.7.25.0
- nasm-2.11.06
- openssl-1.0.2d
- tcl-8.5.15.0
- tk-8.5.15.0
- tix-8.4.3.5
- sqlite-3.6.21
- ) do (
+set libraries=
+set libraries=%libraries% bzip2-1.0.6
+if NOT "%IncludeBsddb%"=="false" set libraries=%libraries% db-4.7.25.0
+if NOT "%IncludeSSL%"=="false" set libraries=%libraries% nasm-2.11.06
+if NOT "%IncludeSSL%"=="false" set libraries=%libraries% openssl-1.0.2d
+set libraries=%libraries% sqlite-3.6.21
+if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tcl-8.5.15.0
+if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tk-8.5.15.0
+if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tix-8.4.3.5
+
+for %%e in (%libraries%) do (
if exist %%e (
echo.%%e already exists, skipping.
) else (