diff --git a/sdk/core/azure-common/pyproject.toml b/sdk/core/azure-common/pyproject.toml index 24fade53ffc2..d4b01892b808 100644 --- a/sdk/core/azure-common/pyproject.toml +++ b/sdk/core/azure-common/pyproject.toml @@ -1,3 +1,40 @@ +[build-system] +requires = ["setuptools>=77.0.3", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "azure-common" +authors = [ + {name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com"}, +] +description = "Microsoft Azure Client Library for Python (Common)" +keywords = ["azure", "azure sdk"] +requires-python = ">=3.6" +license = "MIT" +dependencies = [] +classifiers = [ + "Development Status :: 7 - Inactive", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", +] +dynamic = ["version", "readme"] + +[project.urls] +Repository = "https://github.com/Azure/azure-sdk-for-python" + +[tool.setuptools.dynamic] +version = {attr = "azure.common._version.VERSION"} +readme = {file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +include = ["azure.common*", "azure.profiles*"] + [tool.azure-sdk-build] type_check_samples = false verifytypes = false diff --git a/sdk/core/azure-common/setup.py b/sdk/core/azure-common/setup.py deleted file mode 100644 index aa5b7a0c4992..000000000000 --- a/sdk/core/azure-common/setup.py +++ /dev/null @@ -1,64 +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. -#-------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import setup - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-common" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = 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') - -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=PACKAGE_NAME, - version=version, - description='Microsoft Azure Client Library for Python (Common)', - long_description=readme + '\n\n' + changelog, - 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', - keywords="azure, azure sdk", - classifiers=[ - 'Development Status :: 7 - Inactive', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', - ], - zip_safe=False, - packages=[ - 'azure.common', - 'azure.profiles' - ], - python_requires=">=3.6", -) diff --git a/sdk/core/azure-core-experimental/pyproject.toml b/sdk/core/azure-core-experimental/pyproject.toml index 325bac27d499..1515fb9fed86 100644 --- a/sdk/core/azure-core-experimental/pyproject.toml +++ b/sdk/core/azure-core-experimental/pyproject.toml @@ -1,3 +1,45 @@ +[build-system] +requires = ["setuptools>=77.0.3", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "azure-core-experimental" +authors = [ + {name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com"}, +] +description = "Microsoft Azure Core Experimental Library for Python" +keywords = ["azure", "azure sdk"] +requires-python = ">=3.8" +license = "MIT" +classifiers = [ + "Development Status :: 4 - Beta", + "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", +] +dependencies = [ + "azure-core>=1.30.0", +] +dynamic = ["version", "readme"] + +[project.urls] +Repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core-experimental" + +[tool.setuptools.dynamic] +version = {attr = "azure.core.experimental._version.VERSION"} +readme = {file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +include = ["azure.core.experimental*"] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] + [tool.azure-sdk-build] pyright = false mypy = true diff --git a/sdk/core/azure-core-experimental/setup.py b/sdk/core/azure-core-experimental/setup.py deleted file mode 100644 index a72ac2bc25e6..000000000000 --- a/sdk/core/azure-core-experimental/setup.py +++ /dev/null @@ -1,67 +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. -# -------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup # type: ignore - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-core-experimental" -PACKAGE_PPRINT_NAME = "Core Experimental" - -package_folder_path = "azure/core/experimental" - -# 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) # type: ignore - -if not version: - raise RuntimeError("Cannot find version information") - -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=PACKAGE_NAME, - version=version, - description="Microsoft Azure {} Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=readme + "\n\n" + changelog, - 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/core/azure-core-experimental", - 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.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, - packages=[ - "azure.core.experimental", - ], - include_package_data=True, - package_data={ - "pytyped": ["py.typed"], - }, - python_requires=">=3.8", - install_requires=[ - "azure-core>=1.30.0", - ], -) diff --git a/sdk/core/azure-core-tracing-opentelemetry/pyproject.toml b/sdk/core/azure-core-tracing-opentelemetry/pyproject.toml index 2a4cdda7a635..4f9e55cdbd82 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/pyproject.toml +++ b/sdk/core/azure-core-tracing-opentelemetry/pyproject.toml @@ -1,3 +1,47 @@ +[build-system] +requires = ["setuptools>=77.0.3", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "azure-core-tracing-opentelemetry" +authors = [ + {name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com"}, +] +description = "Microsoft Azure Core OpenTelemetry plugin Library for Python" +keywords = ["azure", "azure sdk"] +requires-python = ">=3.8" +license = "MIT" +classifiers = [ + "Development Status :: 4 - Beta", + "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", + "Programming Language :: Python :: 3.13", +] +dependencies = [ + "opentelemetry-api>=1.12.0", + "azure-core>=1.24.0", +] +dynamic = ["version", "readme"] + +[project.urls] +Repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core-tracing-opentelemetry" + +[tool.setuptools.dynamic] +version = {attr = "azure.core.tracing.ext.opentelemetry_span._version.VERSION"} +readme = {file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +include = ["azure.core.tracing.ext.opentelemetry_span*"] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] + [tool.azure-sdk-build] pyright = false black = true diff --git a/sdk/core/azure-core-tracing-opentelemetry/setup.py b/sdk/core/azure-core-tracing-opentelemetry/setup.py deleted file mode 100644 index 1bb2bcaedc98..000000000000 --- a/sdk/core/azure-core-tracing-opentelemetry/setup.py +++ /dev/null @@ -1,69 +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. -# -------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup # type: ignore - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-core-tracing-opentelemetry" -PACKAGE_PPRINT_NAME = "Azure Core OpenTelemetry plugin" - -package_folder_path = "azure/core/tracing/ext/opentelemetry_span" - -# 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) # type: ignore - -if not version: - raise RuntimeError("Cannot find version information") - -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=PACKAGE_NAME, - version=version, - description="Microsoft Azure {} Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=readme + "\n\n" + changelog, - 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/core/azure-core-tracing-opentelemetry", - 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.8", - "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=[ - "azure.core.tracing.ext.opentelemetry_span", - ], - include_package_data=True, - package_data={ - "pytyped": ["py.typed"], - }, - python_requires=">=3.8", - install_requires=[ - "opentelemetry-api>=1.12.0", - "azure-core>=1.24.0", - ], -) diff --git a/sdk/core/azure-core/pyproject.toml b/sdk/core/azure-core/pyproject.toml index 7d35230251d7..24af3423dd5b 100644 --- a/sdk/core/azure-core/pyproject.toml +++ b/sdk/core/azure-core/pyproject.toml @@ -1,3 +1,50 @@ +[build-system] +requires = ["setuptools>=77.0.3", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "azure-core" +authors = [ + {name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com"}, +] +description = "Microsoft Azure Core Library for Python" +keywords = ["azure", "azure sdk"] +requires-python = ">=3.9" +license = "MIT" +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", +] +dependencies = [ + "requests>=2.21.0", + "typing-extensions>=4.6.0", +] +dynamic = ["version", "readme"] + +[project.optional-dependencies] +aio = ["aiohttp>=3.0"] +tracing = ["opentelemetry-api~=1.26"] + +[project.urls] +Repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core" + +[tool.setuptools.dynamic] +version = {attr = "azure.core._version.VERSION"} +readme = {file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +include = ["azure.core*"] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] + [tool.azure-sdk-build] mypy = true type_check_samples = true diff --git a/sdk/core/azure-core/setup.py b/sdk/core/azure-core/setup.py deleted file mode 100644 index 3f65bdf791d5..000000000000 --- a/sdk/core/azure-core/setup.py +++ /dev/null @@ -1,83 +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. -# -------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup # type: ignore - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-core" -PACKAGE_PPRINT_NAME = "Core" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") -# a-b-c => a.b.c -namespace_name = 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) # type: ignore - -if not version: - raise RuntimeError("Cannot find version information") - -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=PACKAGE_NAME, - version=version, - include_package_data=True, - description="Microsoft Azure {} Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=readme + "\n\n" + changelog, - 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/core/azure-core", - 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=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - ] - ), - package_data={ - "pytyped": ["py.typed"], - }, - python_requires=">=3.9", - install_requires=[ - "requests>=2.21.0", - "typing-extensions>=4.6.0", - ], - extras_require={ - "aio": [ - "aiohttp>=3.0", - ], - "tracing": [ - "opentelemetry-api~=1.26", - ], - }, -) diff --git a/sdk/core/corehttp/pyproject.toml b/sdk/core/corehttp/pyproject.toml index f5de7c105c5b..0cd9141ff7ef 100644 --- a/sdk/core/corehttp/pyproject.toml +++ b/sdk/core/corehttp/pyproject.toml @@ -1,3 +1,52 @@ +[build-system] +requires = ["setuptools>=77.0.3", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "corehttp" +authors = [ + {name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com"}, +] +description = "CoreHTTP Library for Python" +keywords = ["typespec", "core"] +requires-python = ">=3.9" +license = "MIT" +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", + "Programming Language :: Python :: 3.14", +] +dependencies = [ + "typing-extensions>=4.6.0", +] +dynamic = ["version", "readme"] + +[project.optional-dependencies] +requests = ["requests>=2.18.4"] +aiohttp = ["aiohttp>=3.0"] +httpx = ["httpx>=0.25.0"] +tracing = ["opentelemetry-api~=1.26"] + +[project.urls] +Repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/corehttp" + +[tool.setuptools.dynamic] +version = {attr = "corehttp._version.VERSION"} +readme = {file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +include = ["corehttp*"] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] + [tool.azure-sdk-build] pyright = false verify_keywords = false diff --git a/sdk/core/corehttp/setup.py b/sdk/core/corehttp/setup.py deleted file mode 100644 index 61a20dac1121..000000000000 --- a/sdk/core/corehttp/setup.py +++ /dev/null @@ -1,87 +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. -# -------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup # type: ignore - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "corehttp" -PACKAGE_PPRINT_NAME = "CoreHTTP" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") -# a-b-c => a.b.c -namespace_name = 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) # type: ignore - -if not version: - raise RuntimeError("Cannot find version information") - -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=PACKAGE_NAME, - version=version, - include_package_data=True, - description="{} Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=readme + "\n\n" + changelog, - 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/core/corehttp", - keywords="typespec, core", - 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", - "Programming Language :: Python :: 3.14", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - ] - ), - package_data={ - "pytyped": ["py.typed"], - }, - python_requires=">=3.9", - install_requires=[ - "typing-extensions>=4.6.0", - ], - extras_require={ - "requests": [ - "requests>=2.18.4", - ], - "aiohttp": [ - "aiohttp>=3.0", - ], - "httpx": [ - "httpx>=0.25.0", - ], - "tracing": [ - "opentelemetry-api~=1.26", - ], - }, -)