diff --git a/sdk/network/azure-mgmt-frontdoor/setup.py b/sdk/network/azure-mgmt-frontdoor/setup.py index 2a3a36d9c429..3378256d91ef 100644 --- a/sdk/network/azure-mgmt-frontdoor/setup.py +++ b/sdk/network/azure-mgmt-frontdoor/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/network/azure-mgmt-privatedns/setup.py b/sdk/network/azure-mgmt-privatedns/setup.py index 07257146c961..ed8b38d9b7d6 100644 --- a/sdk/network/azure-mgmt-privatedns/setup.py +++ b/sdk/network/azure-mgmt-privatedns/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1)