forked from Azure/azure-sdk-for-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* seed stage will attempt re-download. bump to newer version of virtualenv. bump to a newer version of pip in prep_environment * ensure we install wheel so that we aren't forced onto setup.py only during installation of ci_tools.txt * moving pin of black so we don't install it when it is unused Co-authored-by: Ben Broderick Phillips <[email protected]>
- Loading branch information
1 parent
1c691d8
commit e259121
Showing
5 changed files
with
58 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<# | ||
.SYNOPSIS | ||
Creates a virtual environment while seeding with specific versions of setuptools, wheel, and pip. | ||
.DESCRIPTION | ||
Creates a virtual environment with three specifically targeted wheel versions. When used in conjunction with the environment variable | ||
VIRTUALENV_OVERRIDE_APP_DATA, further virtualenv creations will leverage these targeted wheels specifically. | ||
.PARAMETER Pip | ||
The targeted pip version. | ||
.PARAMETER SetupTools | ||
The targeted setuptools version. | ||
.PARAMETER Wheel | ||
The targeted wheel version. | ||
.PARAMETER SeedDirectory | ||
The location of the virtualenv that will be created. | ||
#> | ||
param ( | ||
$Pip, | ||
$SetupTools, | ||
$Wheel, | ||
$SeedDirectory | ||
) | ||
|
||
$attempts = 0 | ||
|
||
# ensure these can be pulled down from pypi. | ||
$env:PIP_EXTRA_INDEX_URL="https://pypi.python.org/simple" | ||
|
||
while ($attempts -lt 3) { | ||
virtualenv --download --reset-app-data ` | ||
--pip="$Pip" ` | ||
--setuptools="$SetupTools" ` | ||
--wheel="$Wheel" ` | ||
"$SeedDirectory" | ||
if ($LASTEXITCODE -eq 0) { | ||
break | ||
} | ||
|
||
$attempts += 1 | ||
} | ||
|
||
if ($LASTEXITCODE -ne 0) { | ||
Write-Error "Unable to successfully populate an app data directory." | ||
exit $LASTEXITCODE | ||
} |