From f6556013cc472b0b52befefac05e3b6ce28e5868 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Mar 2026 20:54:01 +0000 Subject: [PATCH 1/5] Initial plan From 52d69b832dd1e2396a859c0249619eb65d3d7ed0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Mar 2026 21:06:36 +0000 Subject: [PATCH 2/5] Port setup.py to pyproject.toml for keyvault data-plane packages Co-authored-by: l0lawrence <100643745+l0lawrence@users.noreply.github.com> --- .../pyproject.toml | 65 +++++++++++++++++ .../azure-keyvault-administration/setup.py | 69 ------------------ .../pyproject.toml | 63 ++++++++++++++++ .../azure-keyvault-certificates/setup.py | 69 ------------------ .../azure-keyvault-secrets/pyproject.toml | 62 ++++++++++++++++ sdk/keyvault/azure-keyvault-secrets/setup.py | 69 ------------------ .../pyproject.toml | 59 +++++++++++++++ .../sdk_packaging.toml | 2 + .../azure-keyvault-securitydomain/setup.py | 71 ------------------- sdk/keyvault/azure-keyvault/pyproject.toml | 46 ++++++++++++ sdk/keyvault/azure-keyvault/setup.cfg | 2 - sdk/keyvault/azure-keyvault/setup.py | 46 ------------ 12 files changed, 297 insertions(+), 326 deletions(-) delete mode 100644 sdk/keyvault/azure-keyvault-administration/setup.py delete mode 100644 sdk/keyvault/azure-keyvault-certificates/setup.py delete mode 100644 sdk/keyvault/azure-keyvault-secrets/setup.py create mode 100644 sdk/keyvault/azure-keyvault-securitydomain/pyproject.toml create mode 100644 sdk/keyvault/azure-keyvault-securitydomain/sdk_packaging.toml delete mode 100644 sdk/keyvault/azure-keyvault-securitydomain/setup.py delete mode 100644 sdk/keyvault/azure-keyvault/setup.cfg delete mode 100644 sdk/keyvault/azure-keyvault/setup.py diff --git a/sdk/keyvault/azure-keyvault-administration/pyproject.toml b/sdk/keyvault/azure-keyvault-administration/pyproject.toml index a82bda788dee..1ef1f108c748 100644 --- a/sdk/keyvault/azure-keyvault-administration/pyproject.toml +++ b/sdk/keyvault/azure-keyvault-administration/pyproject.toml @@ -1,6 +1,71 @@ +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "azure-keyvault-administration" +authors = [ + {name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com"}, +] +description = "Microsoft Corporation Key Vault Administration Client Library for Python" +keywords = ["azure", "azure sdk"] +requires-python = ">=3.9" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "License :: OSI Approved :: MIT License", +] +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.38.0", + "typing-extensions>=4.6.0", +] +dynamic = ["version", "readme"] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "azure.keyvault.administration._version.VERSION"} +readme = {file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = ["samples*", "tests*", "azure", "azure.keyvault"] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] + [tool.azure-sdk-build] pyright = false +[tool.uv.sources] +azure-core = { path = "../../core/azure-core" } +azure-identity = { path = "../../identity/azure-identity" } +azure-keyvault-keys = { path = "../azure-keyvault-keys" } +azure-keyvault-nspkg = { path = "../../nspkg/azure-keyvault-nspkg" } +azure-sdk-tools = { path = "../../../eng/tools/azure-sdk-tools" } + +[dependency-groups] +dev = [ + "aiohttp>=3.0", + "azure-core", + "azure-identity", + "azure-keyvault-keys", + "azure-keyvault-nspkg", + "azure-sdk-tools", + "azure-storage-blob==12.6.0", + "parameterized>=0.7.3", + "python-dateutil>=2.8.0", +] + [tool.azure-sdk-conda] in_bundle = true bundle_name = "azure-keyvault" diff --git a/sdk/keyvault/azure-keyvault-administration/setup.py b/sdk/keyvault/azure-keyvault-administration/setup.py deleted file mode 100644 index 0edb70640803..000000000000 --- a/sdk/keyvault/azure-keyvault-administration/setup.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "azure-keyvault-administration" -PACKAGE_PPRINT_NAME = "Key Vault Administration" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - include_package_data=True, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "samples", - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.keyvault", - ] - ), - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.38.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/sdk/keyvault/azure-keyvault-certificates/pyproject.toml b/sdk/keyvault/azure-keyvault-certificates/pyproject.toml index a82bda788dee..bb3c249b7ee2 100644 --- a/sdk/keyvault/azure-keyvault-certificates/pyproject.toml +++ b/sdk/keyvault/azure-keyvault-certificates/pyproject.toml @@ -1,6 +1,69 @@ +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "azure-keyvault-certificates" +authors = [ + {name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com"}, +] +description = "Microsoft Corporation Key Vault Certificates Client Library for Python" +keywords = ["azure", "azure sdk"] +requires-python = ">=3.9" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "License :: OSI Approved :: MIT License", +] +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.31.0", + "typing-extensions>=4.6.0", +] +dynamic = ["version", "readme"] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "azure.keyvault.certificates._version.VERSION"} +readme = {file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = ["samples*", "tests*", "azure", "azure.keyvault"] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] + [tool.azure-sdk-build] pyright = false +[tool.uv.sources] +azure-core = { path = "../../core/azure-core" } +azure-identity = { path = "../../identity/azure-identity" } +azure-keyvault-nspkg = { path = "../../nspkg/azure-keyvault-nspkg" } +azure-sdk-tools = { path = "../../../eng/tools/azure-sdk-tools" } + +[dependency-groups] +dev = [ + "aiohttp>=3.0", + "azure-core", + "azure-identity", + "azure-keyvault-nspkg", + "azure-sdk-tools", + "parameterized>=0.7.3", + "pyopenssl", + "python-dateutil>=2.8.0", +] + [tool.azure-sdk-conda] in_bundle = true bundle_name = "azure-keyvault" diff --git a/sdk/keyvault/azure-keyvault-certificates/setup.py b/sdk/keyvault/azure-keyvault-certificates/setup.py deleted file mode 100644 index b9ea86ee01d9..000000000000 --- a/sdk/keyvault/azure-keyvault-certificates/setup.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "azure-keyvault-certificates" -PACKAGE_PPRINT_NAME = "Key Vault Certificates" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - include_package_data=True, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "samples", - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.keyvault", - ] - ), - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.31.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/sdk/keyvault/azure-keyvault-secrets/pyproject.toml b/sdk/keyvault/azure-keyvault-secrets/pyproject.toml index b66730034d2c..982ade033f84 100644 --- a/sdk/keyvault/azure-keyvault-secrets/pyproject.toml +++ b/sdk/keyvault/azure-keyvault-secrets/pyproject.toml @@ -1,5 +1,67 @@ +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "azure-keyvault-secrets" +authors = [ + {name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com"}, +] +description = "Microsoft Corporation Key Vault Secrets Client Library for Python" +keywords = ["azure", "azure sdk"] +requires-python = ">=3.9" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "License :: OSI Approved :: MIT License", +] +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.31.0", + "typing-extensions>=4.6.0", +] +dynamic = ["version", "readme"] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "azure.keyvault.secrets._version.VERSION"} +readme = {file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = ["samples*", "tests*", "azure", "azure.keyvault"] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] + [tool.azure-sdk-build] +[tool.uv.sources] +azure-core = { path = "../../core/azure-core" } +azure-identity = { path = "../../identity/azure-identity" } +azure-keyvault-nspkg = { path = "../../nspkg/azure-keyvault-nspkg" } +azure-sdk-tools = { path = "../../../eng/tools/azure-sdk-tools" } + +[dependency-groups] +dev = [ + "aiohttp>=3.0", + "azure-core", + "azure-identity", + "azure-keyvault-nspkg", + "azure-sdk-tools", + "parameterized>=0.7.3", + "python-dateutil>=2.8.0", +] + [tool.azure-sdk-conda] in_bundle = true bundle_name = "azure-keyvault" diff --git a/sdk/keyvault/azure-keyvault-secrets/setup.py b/sdk/keyvault/azure-keyvault-secrets/setup.py deleted file mode 100644 index 62f8b4627517..000000000000 --- a/sdk/keyvault/azure-keyvault-secrets/setup.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "azure-keyvault-secrets" -PACKAGE_PPRINT_NAME = "Key Vault Secrets" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - include_package_data=True, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "samples", - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.keyvault", - ] - ), - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.31.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/sdk/keyvault/azure-keyvault-securitydomain/pyproject.toml b/sdk/keyvault/azure-keyvault-securitydomain/pyproject.toml new file mode 100644 index 000000000000..abb24801dfd9 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-securitydomain/pyproject.toml @@ -0,0 +1,59 @@ +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "azure-keyvault-securitydomain" +authors = [ + {name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com"}, +] +description = "Microsoft Corporation Azure Keyvault Securitydomain Client Library for Python" +keywords = ["azure", "azure sdk"] +requires-python = ">=3.9" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "License :: OSI Approved :: MIT License", +] +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.31.0", + "typing-extensions>=4.6.0", +] +dynamic = ["version", "readme"] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "azure.keyvault.securitydomain._version.VERSION"} +readme = {file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = ["samples*", "tests*", "azure", "azure.keyvault"] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] + +[tool.azure-sdk-build] + +[tool.uv.sources] +azure-core = { path = "../../core/azure-core" } +azure-identity = { path = "../../identity/azure-identity" } +azure-sdk-tools = { path = "../../../eng/tools/azure-sdk-tools" } + +[dependency-groups] +dev = [ + "aiohttp", + "azure-core", + "azure-identity", + "azure-sdk-tools", +] diff --git a/sdk/keyvault/azure-keyvault-securitydomain/sdk_packaging.toml b/sdk/keyvault/azure-keyvault-securitydomain/sdk_packaging.toml new file mode 100644 index 000000000000..901bc8ccbfa6 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-securitydomain/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false diff --git a/sdk/keyvault/azure-keyvault-securitydomain/setup.py b/sdk/keyvault/azure-keyvault-securitydomain/setup.py deleted file mode 100644 index 227484eaaeda..000000000000 --- a/sdk/keyvault/azure-keyvault-securitydomain/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "azure-keyvault-securitydomain" -PACKAGE_PPRINT_NAME = "Azure Keyvault Securitydomain" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.keyvault", - ] - ), - include_package_data=True, - package_data={ - "azure.keyvault.securitydomain": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.31.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/sdk/keyvault/azure-keyvault/pyproject.toml b/sdk/keyvault/azure-keyvault/pyproject.toml index b93c482834e2..fbaf5463e212 100644 --- a/sdk/keyvault/azure-keyvault/pyproject.toml +++ b/sdk/keyvault/azure-keyvault/pyproject.toml @@ -1,5 +1,51 @@ +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "azure-keyvault" +version = "4.2.0" +authors = [ + {name = "Microsoft Corporation", email = "azurekeyvault@microsoft.com"}, +] +description = "Microsoft Azure Key Vault Client Libraries for Python" +keywords = ["azure", "azure sdk"] +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +dependencies = [ + "azure-keyvault-certificates~=4.4", + "azure-keyvault-secrets~=4.4", + "azure-keyvault-keys~=4.5", +] +dynamic = ["readme"] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/keyvault/azure-keyvault" + +[tool.setuptools.dynamic] +readme = {file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown"} + [tool.azure-sdk-build] pylint = false +[tool.uv.sources] +azure-sdk-tools = { path = "../../../eng/tools/azure-sdk-tools" } + +[dependency-groups] +dev = [ + "azure-sdk-tools", +] + [tool.azure-sdk-conda] in_bundle = false diff --git a/sdk/keyvault/azure-keyvault/setup.cfg b/sdk/keyvault/azure-keyvault/setup.cfg deleted file mode 100644 index 3c6e79cf31da..000000000000 --- a/sdk/keyvault/azure-keyvault/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 diff --git a/sdk/keyvault/azure-keyvault/setup.py b/sdk/keyvault/azure-keyvault/setup.py deleted file mode 100644 index d847a08ecbaa..000000000000 --- a/sdk/keyvault/azure-keyvault/setup.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from setuptools import setup -from io import open - -with open("README.md", encoding="utf-8") as f: - README = f.read() -with open("CHANGELOG.md", encoding="utf-8") as f: - CHANGELOG = f.read() - -setup( - name='azure-keyvault', - version='4.2.0', - description='Microsoft Azure Key Vault Client Libraries for Python', - long_description=README + "\n\n" + CHANGELOG, - long_description_content_type="text/markdown", - license='MIT License', - author='Microsoft Corporation', - author_email="azurekeyvault@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/keyvault/azure-keyvault", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 5 - Production/Stable", - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - install_requires=[ - 'azure-keyvault-certificates~=4.4', - 'azure-keyvault-secrets~=4.4', - 'azure-keyvault-keys~=4.5', - ], -) From b9df674aef7e20a78854af3e73fd904eb9012443 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Mar 2026 21:58:59 +0000 Subject: [PATCH 3/5] Add requires-python to azure-keyvault meta package to fix CI doc generation Co-authored-by: l0lawrence <100643745+l0lawrence@users.noreply.github.com> --- sdk/keyvault/azure-keyvault/pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/keyvault/azure-keyvault/pyproject.toml b/sdk/keyvault/azure-keyvault/pyproject.toml index fbaf5463e212..15d8920c1f2e 100644 --- a/sdk/keyvault/azure-keyvault/pyproject.toml +++ b/sdk/keyvault/azure-keyvault/pyproject.toml @@ -10,6 +10,7 @@ authors = [ ] description = "Microsoft Azure Key Vault Client Libraries for Python" keywords = ["azure", "azure sdk"] +requires-python = ">=3.8" license = {text = "MIT License"} classifiers = [ "Development Status :: 5 - Production/Stable", From 3a1805a1c9871332e73952e3d24d364843e386f1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Mar 2026 23:09:39 +0000 Subject: [PATCH 4/5] Fix Build Analyze failures: disable pyright for meta/securitydomain packages, fix snippet sync Co-authored-by: l0lawrence <100643745+l0lawrence@users.noreply.github.com> --- sdk/keyvault/azure-keyvault-administration/README.md | 4 ++-- .../samples/access_control_operations.py | 6 +++--- .../samples/access_control_operations_async.py | 10 +++++----- .../samples/backup_restore_operations.py | 2 +- .../samples/backup_restore_operations_async.py | 4 ++-- .../samples/settings_operations.py | 2 +- .../samples/settings_operations_async.py | 2 +- .../azure-keyvault-securitydomain/pyproject.toml | 1 + sdk/keyvault/azure-keyvault/pyproject.toml | 1 + 9 files changed, 17 insertions(+), 15 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-administration/README.md b/sdk/keyvault/azure-keyvault-administration/README.md index f1502b2306d2..bf410bec1589 100644 --- a/sdk/keyvault/azure-keyvault-administration/README.md +++ b/sdk/keyvault/azure-keyvault-administration/README.md @@ -194,12 +194,12 @@ role_definition = client.set_role_definition(scope=scope, role_name=role_name, p new_permissions = [ KeyVaultPermission( data_actions=[KeyVaultDataAction.READ_HSM_KEY], - not_data_actions=[KeyVaultDataAction.CREATE_HSM_KEY] + not_data_actions=[KeyVaultDataAction.CREATE_HSM_KEY], ) ] unique_definition_name = role_definition.name updated_definition = client.set_role_definition( - scope=scope, name=unique_definition_name, role_name=role_name, permissions=new_permissions + scope=scope, name=unique_definition_name, role_name=role_name, permissions=new_permissions, ) ``` diff --git a/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations.py b/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations.py index 4a88c14046d9..7e805ee36d80 100644 --- a/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations.py +++ b/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations.py @@ -12,7 +12,7 @@ # # 3. Set environment variable MANAGED_HSM_URL with the URL of your managed HSM and AZURE_CLIENT_ID with the ID of a # service principal -# +# # 4. Set up your environment to use azure-identity's DefaultAzureCredential. For more information about how to configure # the DefaultAzureCredential, refer to https://aka.ms/azsdk/python/identity/docs#azure.identity.DefaultAzureCredential # @@ -80,12 +80,12 @@ new_permissions = [ KeyVaultPermission( data_actions=[KeyVaultDataAction.READ_HSM_KEY], - not_data_actions=[KeyVaultDataAction.CREATE_HSM_KEY] + not_data_actions=[KeyVaultDataAction.CREATE_HSM_KEY], ) ] unique_definition_name = role_definition.name updated_definition = client.set_role_definition( - scope=scope, name=unique_definition_name, role_name=role_name, permissions=new_permissions + scope=scope, name=unique_definition_name, role_name=role_name, permissions=new_permissions, ) # [END update_a_role_definition] print(f"Role definition '{updated_definition.role_name}' updated successfully.") diff --git a/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations_async.py b/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations_async.py index 4238ea22245d..d4a11a1bf175 100644 --- a/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations_async.py +++ b/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations_async.py @@ -16,7 +16,7 @@ # 2. azure-keyvault-administration and azure-identity libraries (pip install these) # # 3. Set environment variable MANAGED_HSM_URL with the URL of your managed HSM -# +# # 4. Set up your environment to use azure-identity's DefaultAzureCredential. For more information about how to configure # the DefaultAzureCredential, refer to https://aka.ms/azsdk/python/identity/docs#azure.identity.DefaultAzureCredential # @@ -41,7 +41,7 @@ async def run_sample(): # Here we use the DefaultAzureCredential, but any azure-identity credential can be used. credential = DefaultAzureCredential() client = KeyVaultAccessControlClient(vault_url=MANAGED_HSM_URL, credential=credential) - + # Let's first create a custom role definition. This role permits creating keys in a Managed HSM. # We'll provide a friendly role name, and let a unique role definition name (a GUID) be generated for us. print("\n.. Create a role definition") @@ -58,12 +58,12 @@ async def run_sample(): new_permissions = [ KeyVaultPermission( data_actions=[KeyVaultDataAction.READ_HSM_KEY], - not_data_actions=[KeyVaultDataAction.CREATE_HSM_KEY] + not_data_actions=[KeyVaultDataAction.CREATE_HSM_KEY], ) ] unique_definition_name = role_definition.name updated_definition = await client.set_role_definition( - scope=scope, name=unique_definition_name, role_name=role_name, permissions=new_permissions + scope=scope, name=unique_definition_name, role_name=role_name, permissions=new_permissions, ) print(f"Role definition '{updated_definition.role_name}' updated successfully.") @@ -75,7 +75,7 @@ async def run_sample(): definition_id = updated_definition.id assert definition_id role_assignment = await client.create_role_assignment( - scope=scope, definition_id=definition_id, principal_id=principal_id + scope=scope, definition_id=definition_id, principal_id=principal_id, ) assert role_assignment.name print(f"Role assignment {role_assignment.name} created successfully.") diff --git a/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations.py b/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations.py index a36305134280..582b250e5f5f 100644 --- a/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations.py +++ b/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations.py @@ -17,7 +17,7 @@ # 4. A user-assigned managed identity that has access to your managed HSM. For more information about how to create a # user-assigned managed identity, refer to # https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/overview -# +# # 5. A storage account, that your managed identity has access to, containing a blob storage container # (See https://learn.microsoft.com/azure/storage/blobs/storage-blobs-introduction) # diff --git a/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations_async.py b/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations_async.py index 1cba4d1b11ae..e1016d9ea530 100644 --- a/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations_async.py +++ b/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations_async.py @@ -19,7 +19,7 @@ # 4. A user-assigned managed identity that has access to your managed HSM. For more information about how to create a # user-assigned managed identity, refer to # https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/overview -# +# # 5. A storage account, that your managed identity has access to, containing a blob storage container # (See https://learn.microsoft.com/azure/storage/blobs/storage-blobs-introduction) # @@ -45,7 +45,7 @@ async def run_sample(): # Here we use the DefaultAzureCredential, but any azure-identity credential can be used. credential = ManagedIdentityCredential(client_id=MANAGED_IDENTITY_CLIENT_ID) client = KeyVaultBackupClient(vault_url=MANAGED_HSM_URL, credential=credential) - + # Let's back up the vault with begin_backup, which returns a poller. Calling result() on the poller will return # a KeyVaultBackupResult that contains the URL of the backup after the operation completes. Calling wait() on # the poller will wait until the operation is complete. diff --git a/sdk/keyvault/azure-keyvault-administration/samples/settings_operations.py b/sdk/keyvault/azure-keyvault-administration/samples/settings_operations.py index 390e0d7b4e00..e3b134d2b532 100644 --- a/sdk/keyvault/azure-keyvault-administration/samples/settings_operations.py +++ b/sdk/keyvault/azure-keyvault-administration/samples/settings_operations.py @@ -13,7 +13,7 @@ # 2. azure-keyvault-administration and azure-identity libraries (pip install these) # # 3. Set environment variable MANAGED_HSM_URL with the URL of your managed HSM -# +# # 4. Set up your environment to use azure-identity's DefaultAzureCredential. For more information about how to configure # the DefaultAzureCredential, refer to https://aka.ms/azsdk/python/identity/docs#azure.identity.DefaultAzureCredential # diff --git a/sdk/keyvault/azure-keyvault-administration/samples/settings_operations_async.py b/sdk/keyvault/azure-keyvault-administration/samples/settings_operations_async.py index 77a7070a7f44..122a26d9b44d 100644 --- a/sdk/keyvault/azure-keyvault-administration/samples/settings_operations_async.py +++ b/sdk/keyvault/azure-keyvault-administration/samples/settings_operations_async.py @@ -16,7 +16,7 @@ # 2. azure-keyvault-administration and azure-identity libraries (pip install these) # # 3. Set environment variable MANAGED_HSM_URL with the URL of your managed HSM -# +# # 4. Set up your environment to use azure-identity's DefaultAzureCredential. For more information about how to configure # the DefaultAzureCredential, refer to https://aka.ms/azsdk/python/identity/docs#azure.identity.DefaultAzureCredential # diff --git a/sdk/keyvault/azure-keyvault-securitydomain/pyproject.toml b/sdk/keyvault/azure-keyvault-securitydomain/pyproject.toml index abb24801dfd9..c4f56795a7f0 100644 --- a/sdk/keyvault/azure-keyvault-securitydomain/pyproject.toml +++ b/sdk/keyvault/azure-keyvault-securitydomain/pyproject.toml @@ -44,6 +44,7 @@ exclude = ["samples*", "tests*", "azure", "azure.keyvault"] pytyped = ["py.typed"] [tool.azure-sdk-build] +pyright = false [tool.uv.sources] azure-core = { path = "../../core/azure-core" } diff --git a/sdk/keyvault/azure-keyvault/pyproject.toml b/sdk/keyvault/azure-keyvault/pyproject.toml index 15d8920c1f2e..b28e647ec98a 100644 --- a/sdk/keyvault/azure-keyvault/pyproject.toml +++ b/sdk/keyvault/azure-keyvault/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown"} [tool.azure-sdk-build] pylint = false +pyright = false [tool.uv.sources] azure-sdk-tools = { path = "../../../eng/tools/azure-sdk-tools" } From 8e80435a4a4fae5298634cbc1f2c67000d57e2dd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Mar 2026 19:40:21 +0000 Subject: [PATCH 5/5] Revert all changes to azure-keyvault-administration folder Co-authored-by: l0lawrence <100643745+l0lawrence@users.noreply.github.com> --- .../azure-keyvault-administration/README.md | 4 +- .../pyproject.toml | 65 ----------------- .../samples/access_control_operations.py | 6 +- .../access_control_operations_async.py | 10 +-- .../samples/backup_restore_operations.py | 2 +- .../backup_restore_operations_async.py | 4 +- .../samples/settings_operations.py | 2 +- .../samples/settings_operations_async.py | 2 +- .../azure-keyvault-administration/setup.py | 69 +++++++++++++++++++ 9 files changed, 84 insertions(+), 80 deletions(-) create mode 100644 sdk/keyvault/azure-keyvault-administration/setup.py diff --git a/sdk/keyvault/azure-keyvault-administration/README.md b/sdk/keyvault/azure-keyvault-administration/README.md index bf410bec1589..f1502b2306d2 100644 --- a/sdk/keyvault/azure-keyvault-administration/README.md +++ b/sdk/keyvault/azure-keyvault-administration/README.md @@ -194,12 +194,12 @@ role_definition = client.set_role_definition(scope=scope, role_name=role_name, p new_permissions = [ KeyVaultPermission( data_actions=[KeyVaultDataAction.READ_HSM_KEY], - not_data_actions=[KeyVaultDataAction.CREATE_HSM_KEY], + not_data_actions=[KeyVaultDataAction.CREATE_HSM_KEY] ) ] unique_definition_name = role_definition.name updated_definition = client.set_role_definition( - scope=scope, name=unique_definition_name, role_name=role_name, permissions=new_permissions, + scope=scope, name=unique_definition_name, role_name=role_name, permissions=new_permissions ) ``` diff --git a/sdk/keyvault/azure-keyvault-administration/pyproject.toml b/sdk/keyvault/azure-keyvault-administration/pyproject.toml index 1ef1f108c748..a82bda788dee 100644 --- a/sdk/keyvault/azure-keyvault-administration/pyproject.toml +++ b/sdk/keyvault/azure-keyvault-administration/pyproject.toml @@ -1,71 +1,6 @@ -[build-system] -requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version -build-backend = "setuptools.build_meta" - -[project] -name = "azure-keyvault-administration" -authors = [ - {name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com"}, -] -description = "Microsoft Corporation Key Vault Administration Client Library for Python" -keywords = ["azure", "azure sdk"] -requires-python = ">=3.9" -license = {text = "MIT License"} -classifiers = [ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "License :: OSI Approved :: MIT License", -] -dependencies = [ - "isodate>=0.6.1", - "azure-core>=1.38.0", - "typing-extensions>=4.6.0", -] -dynamic = ["version", "readme"] - -[project.urls] -repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" - -[tool.setuptools.dynamic] -version = {attr = "azure.keyvault.administration._version.VERSION"} -readme = {file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown"} - -[tool.setuptools.packages.find] -exclude = ["samples*", "tests*", "azure", "azure.keyvault"] - -[tool.setuptools.package-data] -pytyped = ["py.typed"] - [tool.azure-sdk-build] pyright = false -[tool.uv.sources] -azure-core = { path = "../../core/azure-core" } -azure-identity = { path = "../../identity/azure-identity" } -azure-keyvault-keys = { path = "../azure-keyvault-keys" } -azure-keyvault-nspkg = { path = "../../nspkg/azure-keyvault-nspkg" } -azure-sdk-tools = { path = "../../../eng/tools/azure-sdk-tools" } - -[dependency-groups] -dev = [ - "aiohttp>=3.0", - "azure-core", - "azure-identity", - "azure-keyvault-keys", - "azure-keyvault-nspkg", - "azure-sdk-tools", - "azure-storage-blob==12.6.0", - "parameterized>=0.7.3", - "python-dateutil>=2.8.0", -] - [tool.azure-sdk-conda] in_bundle = true bundle_name = "azure-keyvault" diff --git a/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations.py b/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations.py index 7e805ee36d80..4a88c14046d9 100644 --- a/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations.py +++ b/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations.py @@ -12,7 +12,7 @@ # # 3. Set environment variable MANAGED_HSM_URL with the URL of your managed HSM and AZURE_CLIENT_ID with the ID of a # service principal -# +# # 4. Set up your environment to use azure-identity's DefaultAzureCredential. For more information about how to configure # the DefaultAzureCredential, refer to https://aka.ms/azsdk/python/identity/docs#azure.identity.DefaultAzureCredential # @@ -80,12 +80,12 @@ new_permissions = [ KeyVaultPermission( data_actions=[KeyVaultDataAction.READ_HSM_KEY], - not_data_actions=[KeyVaultDataAction.CREATE_HSM_KEY], + not_data_actions=[KeyVaultDataAction.CREATE_HSM_KEY] ) ] unique_definition_name = role_definition.name updated_definition = client.set_role_definition( - scope=scope, name=unique_definition_name, role_name=role_name, permissions=new_permissions, + scope=scope, name=unique_definition_name, role_name=role_name, permissions=new_permissions ) # [END update_a_role_definition] print(f"Role definition '{updated_definition.role_name}' updated successfully.") diff --git a/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations_async.py b/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations_async.py index d4a11a1bf175..4238ea22245d 100644 --- a/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations_async.py +++ b/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations_async.py @@ -16,7 +16,7 @@ # 2. azure-keyvault-administration and azure-identity libraries (pip install these) # # 3. Set environment variable MANAGED_HSM_URL with the URL of your managed HSM -# +# # 4. Set up your environment to use azure-identity's DefaultAzureCredential. For more information about how to configure # the DefaultAzureCredential, refer to https://aka.ms/azsdk/python/identity/docs#azure.identity.DefaultAzureCredential # @@ -41,7 +41,7 @@ async def run_sample(): # Here we use the DefaultAzureCredential, but any azure-identity credential can be used. credential = DefaultAzureCredential() client = KeyVaultAccessControlClient(vault_url=MANAGED_HSM_URL, credential=credential) - + # Let's first create a custom role definition. This role permits creating keys in a Managed HSM. # We'll provide a friendly role name, and let a unique role definition name (a GUID) be generated for us. print("\n.. Create a role definition") @@ -58,12 +58,12 @@ async def run_sample(): new_permissions = [ KeyVaultPermission( data_actions=[KeyVaultDataAction.READ_HSM_KEY], - not_data_actions=[KeyVaultDataAction.CREATE_HSM_KEY], + not_data_actions=[KeyVaultDataAction.CREATE_HSM_KEY] ) ] unique_definition_name = role_definition.name updated_definition = await client.set_role_definition( - scope=scope, name=unique_definition_name, role_name=role_name, permissions=new_permissions, + scope=scope, name=unique_definition_name, role_name=role_name, permissions=new_permissions ) print(f"Role definition '{updated_definition.role_name}' updated successfully.") @@ -75,7 +75,7 @@ async def run_sample(): definition_id = updated_definition.id assert definition_id role_assignment = await client.create_role_assignment( - scope=scope, definition_id=definition_id, principal_id=principal_id, + scope=scope, definition_id=definition_id, principal_id=principal_id ) assert role_assignment.name print(f"Role assignment {role_assignment.name} created successfully.") diff --git a/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations.py b/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations.py index 582b250e5f5f..a36305134280 100644 --- a/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations.py +++ b/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations.py @@ -17,7 +17,7 @@ # 4. A user-assigned managed identity that has access to your managed HSM. For more information about how to create a # user-assigned managed identity, refer to # https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/overview -# +# # 5. A storage account, that your managed identity has access to, containing a blob storage container # (See https://learn.microsoft.com/azure/storage/blobs/storage-blobs-introduction) # diff --git a/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations_async.py b/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations_async.py index e1016d9ea530..1cba4d1b11ae 100644 --- a/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations_async.py +++ b/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations_async.py @@ -19,7 +19,7 @@ # 4. A user-assigned managed identity that has access to your managed HSM. For more information about how to create a # user-assigned managed identity, refer to # https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/overview -# +# # 5. A storage account, that your managed identity has access to, containing a blob storage container # (See https://learn.microsoft.com/azure/storage/blobs/storage-blobs-introduction) # @@ -45,7 +45,7 @@ async def run_sample(): # Here we use the DefaultAzureCredential, but any azure-identity credential can be used. credential = ManagedIdentityCredential(client_id=MANAGED_IDENTITY_CLIENT_ID) client = KeyVaultBackupClient(vault_url=MANAGED_HSM_URL, credential=credential) - + # Let's back up the vault with begin_backup, which returns a poller. Calling result() on the poller will return # a KeyVaultBackupResult that contains the URL of the backup after the operation completes. Calling wait() on # the poller will wait until the operation is complete. diff --git a/sdk/keyvault/azure-keyvault-administration/samples/settings_operations.py b/sdk/keyvault/azure-keyvault-administration/samples/settings_operations.py index e3b134d2b532..390e0d7b4e00 100644 --- a/sdk/keyvault/azure-keyvault-administration/samples/settings_operations.py +++ b/sdk/keyvault/azure-keyvault-administration/samples/settings_operations.py @@ -13,7 +13,7 @@ # 2. azure-keyvault-administration and azure-identity libraries (pip install these) # # 3. Set environment variable MANAGED_HSM_URL with the URL of your managed HSM -# +# # 4. Set up your environment to use azure-identity's DefaultAzureCredential. For more information about how to configure # the DefaultAzureCredential, refer to https://aka.ms/azsdk/python/identity/docs#azure.identity.DefaultAzureCredential # diff --git a/sdk/keyvault/azure-keyvault-administration/samples/settings_operations_async.py b/sdk/keyvault/azure-keyvault-administration/samples/settings_operations_async.py index 122a26d9b44d..77a7070a7f44 100644 --- a/sdk/keyvault/azure-keyvault-administration/samples/settings_operations_async.py +++ b/sdk/keyvault/azure-keyvault-administration/samples/settings_operations_async.py @@ -16,7 +16,7 @@ # 2. azure-keyvault-administration and azure-identity libraries (pip install these) # # 3. Set environment variable MANAGED_HSM_URL with the URL of your managed HSM -# +# # 4. Set up your environment to use azure-identity's DefaultAzureCredential. For more information about how to configure # the DefaultAzureCredential, refer to https://aka.ms/azsdk/python/identity/docs#azure.identity.DefaultAzureCredential # diff --git a/sdk/keyvault/azure-keyvault-administration/setup.py b/sdk/keyvault/azure-keyvault-administration/setup.py new file mode 100644 index 000000000000..0edb70640803 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-administration/setup.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + + +import os +import re +from setuptools import setup, find_packages + + +PACKAGE_NAME = "azure-keyvault-administration" +PACKAGE_PPRINT_NAME = "Key Vault Administration" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace("-", "/") + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError("Cannot find version information") + + +setup( + name=PACKAGE_NAME, + version=version, + include_package_data=True, + description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=open("README.md", "r").read(), + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", + keywords="azure, azure sdk", + classifiers=[ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "License :: OSI Approved :: MIT License", + ], + zip_safe=False, + packages=find_packages( + exclude=[ + "samples", + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.keyvault", + ] + ), + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.38.0", + "typing-extensions>=4.6.0", + ], + python_requires=">=3.9", +)