|
2 | 2 | # Authors: Olivier Grisel, Jonathan Helmus, Kyle Kastner, and Alex Willmer
|
3 | 3 | # License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
|
4 | 4 |
|
5 |
| -$MINICONDA_URL = "http://repo.continuum.io/miniconda/" |
6 | 5 | $BASE_URL = "https://www.python.org/ftp/python/"
|
7 | 6 | $GET_PIP_URL = "https://bootstrap.pypa.io/get-pip.py"
|
8 | 7 | $GET_PIP_PATH = "C:\get-pip.py"
|
@@ -169,58 +168,6 @@ function InstallPip ($python_home) {
|
169 | 168 | }
|
170 | 169 |
|
171 | 170 |
|
172 |
| -function DownloadMiniconda ($python_version, $platform_suffix) { |
173 |
| - if ($python_version -eq "3.4") { |
174 |
| - $filename = "Miniconda3-3.5.5-Windows-" + $platform_suffix + ".exe" |
175 |
| - } else { |
176 |
| - $filename = "Miniconda-3.5.5-Windows-" + $platform_suffix + ".exe" |
177 |
| - } |
178 |
| - $url = $MINICONDA_URL + $filename |
179 |
| - $filepath = Download $filename $url |
180 |
| - return $filepath |
181 |
| -} |
182 |
| - |
183 |
| - |
184 |
| -function InstallMiniconda ($python_version, $architecture, $python_home) { |
185 |
| - Write-Host "Installing Python" $python_version "for" $architecture "bit architecture to" $python_home |
186 |
| - if (Test-Path $python_home) { |
187 |
| - Write-Host $python_home "already exists, skipping." |
188 |
| - return $false |
189 |
| - } |
190 |
| - if ($architecture -eq "32") { |
191 |
| - $platform_suffix = "x86" |
192 |
| - } else { |
193 |
| - $platform_suffix = "x86_64" |
194 |
| - } |
195 |
| - $filepath = DownloadMiniconda $python_version $platform_suffix |
196 |
| - Write-Host "Installing" $filepath "to" $python_home |
197 |
| - $install_log = $python_home + ".log" |
198 |
| - $args = "/S /D=$python_home" |
199 |
| - Write-Host $filepath $args |
200 |
| - Start-Process -FilePath $filepath -ArgumentList $args -Wait -Passthru |
201 |
| - if (Test-Path $python_home) { |
202 |
| - Write-Host "Python $python_version ($architecture) installation complete" |
203 |
| - } else { |
204 |
| - Write-Host "Failed to install Python in $python_home" |
205 |
| - Get-Content -Path $install_log |
206 |
| - Exit 1 |
207 |
| - } |
208 |
| -} |
209 |
| - |
210 |
| - |
211 |
| -function InstallMinicondaPip ($python_home) { |
212 |
| - $pip_path = $python_home + "\Scripts\pip.exe" |
213 |
| - $conda_path = $python_home + "\Scripts\conda.exe" |
214 |
| - if (-not(Test-Path $pip_path)) { |
215 |
| - Write-Host "Installing pip..." |
216 |
| - $args = "install --yes pip" |
217 |
| - Write-Host $conda_path $args |
218 |
| - Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait -Passthru |
219 |
| - } else { |
220 |
| - Write-Host "pip already installed." |
221 |
| - } |
222 |
| -} |
223 |
| - |
224 | 171 | function main () {
|
225 | 172 | InstallPython $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON
|
226 | 173 | InstallPip $env:PYTHON
|
|
0 commit comments