11$Language = " python"
2- $Lang = " python"
32$PackageRepository = " PyPI"
43$packagePattern = " *.zip"
54$MetadataUri = " https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/releases/latest/python-packages.csv"
65
7- function Extract -python-PkgProperties ($pkgPath , $serviceName , $pkgName )
6+ function Get -python-PackageInfoFromRepo ($pkgPath , $serviceDirectory , $pkgName )
87{
98 $pkgName = $pkgName.Replace (' _' , ' -' )
109 if (Test-Path (Join-Path $pkgPath " setup.py" ))
@@ -15,7 +14,7 @@ function Extract-python-PkgProperties ($pkgPath, $serviceName, $pkgName)
1514 popd
1615 if (($setupProps -ne $null ) -and ($setupProps [0 ] -eq $pkgName ))
1716 {
18- return [PackageProps ]::new($setupProps [0 ], $setupProps [1 ], $pkgPath , $serviceName )
17+ return [PackageProps ]::new($setupProps [0 ], $setupProps [1 ], $pkgPath , $serviceDirectory )
1918 }
2019 }
2120 return $null
@@ -25,7 +24,7 @@ function Extract-python-PkgProperties ($pkgPath, $serviceName, $pkgName)
2524function IsPythonPackageVersionPublished ($pkgId , $pkgVersion ) {
2625 try
2726 {
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
2928 # if existingVersion exists, then it's already been published
3029 return $True
3130 }
@@ -47,7 +46,7 @@ function IsPythonPackageVersionPublished($pkgId, $pkgVersion) {
4746}
4847
4948# 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 ) {
5150 $pkg.Basename -match $SDIST_PACKAGE_REGEX | Out-Null
5251
5352 $pkgId = $matches [" package" ]
@@ -84,7 +83,7 @@ function Parse-python-Package($pkg, $workingDirectory) {
8483}
8584
8685# Stage and Upload Docs to blob Storage
87- function StageAndUpload -python-Docs ()
86+ function Publish -python-GithubIODocs ()
8887{
8988 $PublishedDocs = Get-ChildItem " $DocLocation " | Where-Object - FilterScript {$_.Name.EndsWith (" .zip" )}
9089
0 commit comments