From f84913bd7715efa21e6ccdf9d1e9d626060f2686 Mon Sep 17 00:00:00 2001 From: Scott Beddall <45376673+scbedd@users.noreply.github.com> Date: Thu, 25 Feb 2021 13:17:51 -0800 Subject: [PATCH] Update get_package_properties to also return path to setup.py (#16946) * return package path alongside rest of the tuple in common_tasks.py::get_package_properties --- eng/scripts/Language-Settings.ps1 | 2 +- scripts/devops_tasks/common_tasks.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1 index 5b7044afee3e..7dff11c4541c 100644 --- a/eng/scripts/Language-Settings.ps1 +++ b/eng/scripts/Language-Settings.ps1 @@ -22,7 +22,7 @@ function Get-python-PackageInfoFromRepo ($pkgPath, $serviceDirectory, $pkgName) $setupProps = $null try{ pip install packaging==20.4 -q -I - $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}'.format(obj[0], obj[1], obj[2]));") -split "," + $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 "," } catch { diff --git a/scripts/devops_tasks/common_tasks.py b/scripts/devops_tasks/common_tasks.py index 1ec5d86cdbf3..733a53c00b88 100644 --- a/scripts/devops_tasks/common_tasks.py +++ b/scripts/devops_tasks/common_tasks.py @@ -475,4 +475,4 @@ def get_package_properties(setup_py_path): """ pkgName, version, _, requires = parse_setup(setup_py_path) is_new_sdk = pkgName in NEW_REQ_PACKAGES or any(map(lambda x: (parse_require(x)[0] in NEW_REQ_PACKAGES), requires)) - return pkgName, version, is_new_sdk + return pkgName, version, is_new_sdk, setup_py_path