@@ -57,50 +57,6 @@ function Get-AllPackageInfoFromRepo ($serviceDirectory)
5757 return $allPackageProps
5858}
5959
60- function Get-python-PackageInfoFromRepo ($pkgPath , $serviceDirectory , $pkgName )
61- {
62- $packageName = $pkgName.Replace (' _' , ' -' )
63- $pkgDirName = Split-Path $pkgPath - Leaf
64- if ($pkgDirName -ne $packageName )
65- {
66- # Common code triggers this function against each directory but we can skip if it doesn't match package name
67- return $null
68- }
69-
70- if (Test-Path (Join-Path $pkgPath " setup.py" ))
71- {
72- $setupLocation = $pkgPath.Replace (' \' , ' /' )
73- pushd $RepoRoot
74- $setupProps = $null
75- try {
76- pip install packaging== 20.4 - q - I
77- $setupProps = (python - c " import sys; import os; sys.path.append(os.path.join('scripts', 'devops_tasks')); from common_tasks import get_package_properties; obj=get_package_properties('$setupLocation '); print('{0},{1},{2},{3}'.format(obj[0], obj[1], obj[2], obj[3]));" ) -split " ,"
78- }
79- catch
80- {
81- # This is soft error and failure is expected for python metapackages
82- Write-Host " Failed to parse package properties for " $packageName
83- }
84- popd
85- if (($setupProps -ne $null ) -and ($setupProps [0 ] -eq $packageName ))
86- {
87- $pkgProp = [PackageProps ]::new($setupProps [0 ], $setupProps [1 ], $pkgPath , $serviceDirectory )
88- if ($packageName -match " mgmt" )
89- {
90- $pkgProp.SdkType = " mgmt"
91- }
92- else
93- {
94- $pkgProp.SdkType = " client"
95- }
96- $pkgProp.IsNewSdk = ($setupProps [2 ] -eq " True" )
97- $pkgProp.ArtifactName = $pkgName
98- return $pkgProp
99- }
100- }
101- return $null
102- }
103-
10460# Returns the pypi publish status of a package id and version.
10561function IsPythonPackageVersionPublished ($pkgId , $pkgVersion )
10662{
@@ -304,7 +260,7 @@ function Find-python-Artifacts-For-Apireview($artifactDir, $artifactName)
304260 return $packages
305261}
306262
307- function SetPackageVersion ($PackageName , $Version , $ServiceDirectory , $ReleaseDate , $BuildType = $null , $GroupId = $null )
263+ function SetPackageVersion ($PackageName , $Version , $ServiceDirectory , $ReleaseDate )
308264{
309265 if ($null -eq $ReleaseDate )
310266 {
0 commit comments