File: install.ps1

package info (click to toggle)
python-invoke 1.4.1%2Bds-0.1~bpo10%2B1
  • links: PTS, VCS
  • area: main
  • in suites: buster-backports
  • size: 1,704 kB
  • sloc: python: 11,377; makefile: 18; sh: 12
file content (24 lines) | stat: -rw-r--r-- 876 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$GET_PIP_URL = "https://bootstrap.pypa.io/get-pip.py"
$GET_PIP_PATH = "C:\get-pip.py"

function InstallPip ($python_home) {
    $pip_path = $python_home + "/Scripts/pip.exe"
    $python_path = $python_home + "/python.exe"
    if (-not (Test-Path $pip_path)) {
        Write-Host "Installing pip..."
        if (-not (Test-Path $GET_PIP_PATH)) {
            $webclient = New-Object System.Net.WebClient
            $webclient.DownloadFile($GET_PIP_URL, $GET_PIP_PATH)
        }
        Write-Host "Executing:" $python_path $GET_PIP_PATH
        Start-Process -FilePath "$python_path" -ArgumentList "$GET_PIP_PATH" -Wait
    } else {
        Write-Host "pip already installed."
    }
}

InstallPip $env:PYTHON

# Install the dev requirements (we only need some of these, but don't
# worry about that for now)
& ($env:PYTHON + "/Scripts/pip.exe") install -r dev-requirements.txt