diff --git a/azure-sdk-tools/packaging_tools/__init__.py b/azure-sdk-tools/packaging_tools/__init__.py index fe6260c26f7b..66542a4e9c84 100644 --- a/azure-sdk-tools/packaging_tools/__init__.py +++ b/azure-sdk-tools/packaging_tools/__init__.py @@ -31,6 +31,9 @@ def build_config(config : Dict[str, Any]) -> Dict[str, str]: # ARM? result['is_arm'] = result.pop("is_arm", True) + # Do I need msrestazure for this package? + result['need_msrestazure'] = result.pop("need_msrestazure", True) + # Pre-compute some Jinja variable that are complicated to do inside the templates package_parts = result["package_nspkg"][:-len('-nspkg')].split('-') result['nspkg_names'] = [ diff --git a/azure-sdk-tools/packaging_tools/conf.py b/azure-sdk-tools/packaging_tools/conf.py index 2059ccfdddac..2b821ac62c5f 100644 --- a/azure-sdk-tools/packaging_tools/conf.py +++ b/azure-sdk-tools/packaging_tools/conf.py @@ -16,7 +16,8 @@ "package_pprint_name": "MyService Management", "package_doc_id": "", "is_stable": False, - "is_arm": True + "is_arm": True, + "need_msrestazure": True } def read_conf(folder: Path) -> Dict[str, Any]: diff --git a/azure-sdk-tools/packaging_tools/templates/setup.py b/azure-sdk-tools/packaging_tools/templates/setup.py index 89be50d5dfb9..8ec68d1f2bf1 100644 --- a/azure-sdk-tools/packaging_tools/templates/setup.py +++ b/azure-sdk-tools/packaging_tools/templates/setup.py @@ -79,7 +79,9 @@ ]), install_requires=[ 'msrest>=0.5.0', + {%- if need_msrestazure %} 'msrestazure>=0.4.32,<2.0.0', + {%- endif %} 'azure-common~=1.1', ], extras_require={