From 3c3e23806dfab56eb4814bf7763e5fe5150fcc48 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Wed, 30 Jul 2025 17:54:44 +0800 Subject: [PATCH 1/2] fix outputfolder of packaging files for arm sdk --- .../generator/pygen/codegen/serializers/__init__.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/http-client-python/generator/pygen/codegen/serializers/__init__.py b/packages/http-client-python/generator/pygen/codegen/serializers/__init__.py index d3a3766479a..4e1aad3b484 100644 --- a/packages/http-client-python/generator/pygen/codegen/serializers/__init__.py +++ b/packages/http-client-python/generator/pygen/codegen/serializers/__init__.py @@ -228,8 +228,8 @@ def _serialize_and_write_package_files(self, client_namespace: str) -> None: file = template_name.replace(".jinja2", "") output_name = root_of_sdk / file if not self.read_file(output_name) or file in _REGENERATE_FILES: - if self.keep_version_file and file == "setup.py": - # don't regenerate setup.py file if the version file is more up to date + if self.keep_version_file and file == "setup.py" and not self.code_model.options["azure-arm"]: + # don't regenerate setup.py file if the version file is more up to date for data-plane continue self.write_file( output_name, @@ -487,7 +487,11 @@ def exec_path_for_test_sample(self, namespace: str) -> Path: # pylint: disable=line-too-long def exec_path(self, namespace: str) -> Path: - if self.code_model.options["no-namespace-folders"] and not self.code_model.options["multiapi"]: + if ( + self.code_model.options["no-namespace-folders"] + and not self.code_model.options["multiapi"] + and not self.code_model.options["azure-arm"] + ): # when output folder contains parts different from the namespace, we fall back to current folder directly. # (e.g. https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/communication/azure-communication-callautomation/swagger/SWAGGER.md) return Path(".") From 22df76fcaa1e75ca8fcbaafbe225ae486fb7f928 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Wed, 30 Jul 2025 17:55:30 +0800 Subject: [PATCH 2/2] add changelog --- .../changes/fix-packaging-for-arm-2025-6-30-17-55-15.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .chronus/changes/fix-packaging-for-arm-2025-6-30-17-55-15.md diff --git a/.chronus/changes/fix-packaging-for-arm-2025-6-30-17-55-15.md b/.chronus/changes/fix-packaging-for-arm-2025-6-30-17-55-15.md new file mode 100644 index 00000000000..07c883eed5f --- /dev/null +++ b/.chronus/changes/fix-packaging-for-arm-2025-6-30-17-55-15.md @@ -0,0 +1,7 @@ +--- +changeKind: fix +packages: + - "@typespec/http-client-python" +--- + +fix outputfolder of packaging files for arm sdk \ No newline at end of file