diff --git a/sdk/azure-mgmt-securityinsight/setup.py b/sdk/azure-mgmt-securityinsight/setup.py index 96cf5c234fd5..5367f99a4f69 100644 --- a/sdk/azure-mgmt-securityinsight/setup.py +++ b/sdk/azure-mgmt-securityinsight/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)