1
1
$Language = " python"
2
- $Lang = " python"
3
2
$PackageRepository = " PyPI"
4
3
$packagePattern = " *.zip"
5
4
$MetadataUri = " https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/releases/latest/python-packages.csv"
6
5
7
- function Extract -python-PkgProperties ($pkgPath , $serviceName , $pkgName )
6
+ function Get -python-PackageInfoFromRepo ($pkgPath , $serviceDirectory , $pkgName )
8
7
{
9
8
$pkgName = $pkgName.Replace (' _' , ' -' )
10
9
if (Test-Path (Join-Path $pkgPath " setup.py" ))
@@ -15,7 +14,7 @@ function Extract-python-PkgProperties ($pkgPath, $serviceName, $pkgName)
15
14
popd
16
15
if (($setupProps -ne $null ) -and ($setupProps [0 ] -eq $pkgName ))
17
16
{
18
- return [PackageProps ]::new($setupProps [0 ], $setupProps [1 ], $pkgPath , $serviceName )
17
+ return [PackageProps ]::new($setupProps [0 ], $setupProps [1 ], $pkgPath , $serviceDirectory )
19
18
}
20
19
}
21
20
return $null
@@ -25,7 +24,7 @@ function Extract-python-PkgProperties ($pkgPath, $serviceName, $pkgName)
25
24
function IsPythonPackageVersionPublished ($pkgId , $pkgVersion ) {
26
25
try
27
26
{
28
- $existingVersion = (Invoke-RestMethod - MaximumRetryCount 3 - Method " Get" - uri " https://pypi.org/pypi/$pkgId /$pkgVersion /json" ).info.version
27
+ $existingVersion = (Invoke-RestMethod - MaximumRetryCount 3 - RetryIntervalSec 10 - Method " Get" - uri " https://pypi.org/pypi/$pkgId /$pkgVersion /json" ).info.version
29
28
# if existingVersion exists, then it's already been published
30
29
return $True
31
30
}
@@ -47,7 +46,7 @@ function IsPythonPackageVersionPublished($pkgId, $pkgVersion) {
47
46
}
48
47
49
48
# Parse out package publishing information given a python sdist of ZIP format.
50
- function Parse -python-Package ($pkg , $workingDirectory ) {
49
+ function Get -python-PackageInfoFromPackageFile ($pkg , $workingDirectory ) {
51
50
$pkg.Basename -match $SDIST_PACKAGE_REGEX | Out-Null
52
51
53
52
$pkgId = $matches [" package" ]
@@ -84,7 +83,7 @@ function Parse-python-Package($pkg, $workingDirectory) {
84
83
}
85
84
86
85
# Stage and Upload Docs to blob Storage
87
- function StageAndUpload -python-Docs ()
86
+ function Publish -python-GithubIODocs ()
88
87
{
89
88
$PublishedDocs = Get-ChildItem " $DocLocation " | Where-Object - FilterScript {$_.Name.EndsWith (" .zip" )}
90
89
0 commit comments