mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-21 23:30:58 +00:00
116d0857a2
Signed-off-by: Dan Ryan <dan@danryan.co> Fix variable references Signed-off-by: Dan Ryan <dan@danryan.co> Fix variable references Signed-off-by: Dan Ryan <dan@danryan.co> Switch to powershell for windows virtualenv creation Signed-off-by: Dan Ryan <dan@danryan.co> use python version as path Signed-off-by: Dan Ryan <dan@danryan.co> use python version as path Signed-off-by: Dan Ryan <dan@danryan.co> swap variable name for python exe Signed-off-by: Dan Ryan <dan@danryan.co> add fallback for python exe Signed-off-by: Dan Ryan <dan@danryan.co> fix python variable setting Signed-off-by: Dan Ryan <dan@danryan.co> fix python variable setting Signed-off-by: Dan Ryan <dan@danryan.co> Use variable susbstitution for python executable location Signed-off-by: Dan Ryan <dan@danryan.co> Use activate script properly Signed-off-by: Dan Ryan <dan@danryan.co> Fix floating quote in python version Signed-off-by: Dan Ryan <dan@danryan.co> Don't block on safety call in python 2 as it overwrites output for some reason Signed-off-by: Dan Ryan <dan.ryan@xyleminc.com> Don't block on pipenv graph either Signed-off-by: Dan Ryan <dan@danryan.co> Check command return code instead of calling `block` Signed-off-by: Dan Ryan <dan@danryan.co> Don't load json after its already loaded Signed-off-by: Dan Ryan <dan@danryan.co> Wait on return code before checking contents Signed-off-by: Dan Ryan <dan@danryan.co>
31 lines
1.4 KiB
YAML
31 lines
1.4 KiB
YAML
steps:
|
|
|
|
- powershell: |
|
|
$env:PY_EXE=$(python -c "import sys; print(sys.executable)")
|
|
if (!$env:PY_EXE) {
|
|
$env:PY_EXE="python"
|
|
}
|
|
Write-Host "##vso[task.setvariable variable=PY_EXE]"$env:PY_EXE
|
|
Write-Host "Found Python: $env:PY_EXE"
|
|
Invoke-Expression "$env:PY_EXE -m virtualenv D:\.venv"
|
|
Write-Host "##vso[task.setvariable variable=VIRTUAL_ENV]D:\.venv"
|
|
Invoke-Expression "D:\.venv\Scripts\activate.ps1"
|
|
$env:VIRTUAL_ENV="D:\.venv"
|
|
Write-Host "Installing local package..."
|
|
Invoke-Expression "$env:PY_EXE -m pip install -e .[test] --upgrade"
|
|
Write-Host "upgrading local package in virtual env"
|
|
$venv_scripts = Join-Path -path D:\.venv -childpath Scripts
|
|
$venv_py = Join-Path -path $venv_scripts -childpath python.exe
|
|
Invoke-Expression "$venv_py -m pip install -e .[test] --upgrade"
|
|
Write-Host "Installing pipenv development packages"
|
|
Invoke-Expression "$venv_py -m pipenv install --dev"
|
|
Write-Host "Installing local package in pipenv environment"
|
|
Invoke-Expression "$venv_py -m pipenv run pip install -e .[test]"
|
|
Write-Host "Printing metadata"
|
|
Write-Host $(Invoke-Expression "$venv_py -m pipenv --venv")
|
|
Write-Host $(Invoke-Expression "$venv_py -m pipenv --py")
|
|
Write-Host $(Invoke-Expression "$venv_py -m pipenv run python --version")
|
|
displayName: Make Virtualenv
|
|
env:
|
|
PIPENV_DEFAULT_PYTHON_VERSION: $(PIPENV_DEFAULT_PYTHON_VERSION)
|