From 4b8a195e4c06946cb8ecea0d40eda049de04ca2b Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Mon, 13 Jun 2022 14:54:29 +0800 Subject: [PATCH] update autorest version and template for pytyped (#24823) --- scripts/quickstart_tooling_dpg/main.py | 2 +- scripts/quickstart_tooling_dpg/template/MANIFEST.in | 3 ++- scripts/quickstart_tooling_dpg/template/sdk_packaging.toml | 6 ------ scripts/quickstart_tooling_dpg/template/setup.py | 4 ++++ 4 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 scripts/quickstart_tooling_dpg/template/sdk_packaging.toml diff --git a/scripts/quickstart_tooling_dpg/main.py b/scripts/quickstart_tooling_dpg/main.py index cdb0e3b3f09b..55511e6f95e2 100644 --- a/scripts/quickstart_tooling_dpg/main.py +++ b/scripts/quickstart_tooling_dpg/main.py @@ -77,7 +77,7 @@ def build_package(**kwargs) -> None: # generate code with autorest and swagger readme _LOGGER.info("generate SDK code with autorest") - check_call(f'autorest --version=3.7.2 --use=@autorest/python@5.16.0 --use=@autorest/modelerfour@4.19.3' + check_call(f'autorest --version=3.8.1 --use=@autorest/python@5.17.0 --use=@autorest/modelerfour@4.23.5' f' {swagger_readme}', shell=True) # generate necessary file(setup.py, CHANGELOG.md, etc) diff --git a/scripts/quickstart_tooling_dpg/template/MANIFEST.in b/scripts/quickstart_tooling_dpg/template/MANIFEST.in index 03b5966d07e5..635079f85b87 100644 --- a/scripts/quickstart_tooling_dpg/template/MANIFEST.in +++ b/scripts/quickstart_tooling_dpg/template/MANIFEST.in @@ -3,4 +3,5 @@ include {{ folder_first }}/__init__.py include {{ folder_first }}/{{ folder_second }}/__init__.py include LICENSE recursive-include tests *.py -recursive-include samples *.py *.md \ No newline at end of file +recursive-include samples *.py *.md +include {{ package_name.replace('-', '/') }}/py.typed diff --git a/scripts/quickstart_tooling_dpg/template/sdk_packaging.toml b/scripts/quickstart_tooling_dpg/template/sdk_packaging.toml deleted file mode 100644 index 346698a109f0..000000000000 --- a/scripts/quickstart_tooling_dpg/template/sdk_packaging.toml +++ /dev/null @@ -1,6 +0,0 @@ -[packaging] -package_name = "{{ package_name }}" -package_pprint_name = "{{ package_pprint_name }}" -package_doc_id = "" -is_stable = false -is_arm = false \ No newline at end of file diff --git a/scripts/quickstart_tooling_dpg/template/setup.py b/scripts/quickstart_tooling_dpg/template/setup.py index f724061c6d8d..95c4d5588532 100644 --- a/scripts/quickstart_tooling_dpg/template/setup.py +++ b/scripts/quickstart_tooling_dpg/template/setup.py @@ -47,6 +47,10 @@ "Programming Language :: Python :: 3.10", "License :: OSI Approved :: MIT License", ], + include_package_data=True, + package_data={ + "pytyped": ["py.typed"], + }, zip_safe=False, packages=find_packages( exclude=[