File: env.ps1

package info (click to toggle)
python-dcos 0.2.0-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,440 kB
  • sloc: python: 8,196; sh: 194; makefile: 36
file content (22 lines) | stat: -rw-r--r-- 688 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$BaseDir = (Get-Location).Path
if (-Not (Test-Path $BaseDir\env -PathType Container)) {
    virtualenv -q $BASEDIR/env --prompt='(dcoscli) '
    echo "Virtualenv created."

    & $BASEDIR/env/Scripts/activate
    echo "Virtualenv activated."

    & $BASEDIR/env/Scripts/pip.exe install -r $BASEDIR/requirements.txt
    & $BASEDIR/env/Scripts/pip.exe install -e $BASEDIR
    echo "Requirements installed."
}
ElseIf ((Test-Path $BASEDIR/env/bin/activate )) {

    & $BASEDIR/env/Scripts/activate
    echo "Virtualenv activated."

    & $BASEDIR/env/Scripts/pip install -r $BASEDIR/requirements.txt
    & $BASEDIR/env/Scripts/pip install -e $BASEDIR
    echo "Requirements installed."

}