diff --git a/sdk/onlineexperimentation/azure-onlineexperimentation/pyproject.toml b/sdk/onlineexperimentation/azure-onlineexperimentation/pyproject.toml new file mode 100644 index 000000000000..78618f7c59c1 --- /dev/null +++ b/sdk/onlineexperimentation/azure-onlineexperimentation/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=77.0.3", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "azure-onlineexperimentation" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Onlineexperimentation Client Library for Python" +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", +] +requires-python = ">=3.9" +keywords = [ + "azure", + "azure sdk", +] +version = "1.0.0b1" +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = ["readme"] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +readme = {file = [ + "README.md", + "CHANGELOG.md", +], content-type = "text/markdown"} + +[tool.setuptools.package-data] +pytyped = ["py.typed"] + +[tool.setuptools.packages.find] +exclude = [ + "azure", + "tests", +] diff --git a/sdk/onlineexperimentation/azure-onlineexperimentation/setup.py b/sdk/onlineexperimentation/azure-onlineexperimentation/setup.py deleted file mode 100644 index 0ae144b3bb0e..000000000000 --- a/sdk/onlineexperimentation/azure-onlineexperimentation/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-onlineexperimentation" -PACKAGE_PPRINT_NAME = "Azure Onlineexperimentation" - -# 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", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - ] - ), - include_package_data=True, - package_data={ - "azure.onlineexperimentation": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/sdk/openai/azure-openai/pyproject.toml b/sdk/openai/azure-openai/pyproject.toml index 825426301560..3a479584d52b 100644 --- a/sdk/openai/azure-openai/pyproject.toml +++ b/sdk/openai/azure-openai/pyproject.toml @@ -1,3 +1,59 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=77.0.3", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "azure-openai" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Azure Azure OpenAI Client Library for Python" +license = "MIT" +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", +] +requires-python = ">=3.7" +keywords = [ + "azure", + "azure sdk", +] +version = "1.0.0b1" +dependencies = [ + "azure-identity<2.0.0,>=1.15.0", +] +dynamic = ["readme"] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python" + +[tool.setuptools.dynamic] +readme = {file = [ + "README.md", + "CHANGELOG.md", +], content-type = "text/markdown"} + +[tool.setuptools.package-data] +pytyped = ["py.typed"] + +[tool.setuptools.packages.find] +exclude = [ + "azure", + "tests", +] + [tool.azure-sdk-build] pylint = false mypy = false diff --git a/sdk/openai/azure-openai/setup.py b/sdk/openai/azure-openai/setup.py deleted file mode 100644 index c111c60387bb..000000000000 --- a/sdk/openai/azure-openai/setup.py +++ /dev/null @@ -1,72 +0,0 @@ -from setuptools import setup, find_packages -import os -from io import open -import re - -# azure openai testing package - -PACKAGE_NAME = "azure-openai" -PACKAGE_PPRINT_NAME = "Azure OpenAI" - -# 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: - long_description = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - # ensure that these are updated to reflect the package owners' information - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/Azure/azure-sdk-for-python", - keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product - author="Microsoft Corporation", - author_email="azuresdkengsysadmins@microsoft.com", - license="MIT License", - # ensure that the development status reflects the status of your package - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "License :: OSI Approved :: MIT License", - ], - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - # This means any folder structure that only consists of a __init__.py. - # For example, for storage, this would mean adding 'azure.storage' - # in addition to the default 'azure' that is seen here. - "azure", - ] - ), - include_package_data=True, - package_data={ - 'azure.openai': ['py.typed'], - }, - install_requires=[ - "azure-identity<2.0.0,>=1.15.0" - ], - python_requires=">=3.7", - project_urls={ - "Bug Reports": "https://github.com/Azure/azure-sdk-for-python/issues", - "Source": "https://github.com/Azure/azure-sdk-for-python", - }, -) diff --git a/sdk/projects/azure-projects/pyproject.toml b/sdk/projects/azure-projects/pyproject.toml index d99d7775f7cf..4dea51026af0 100644 --- a/sdk/projects/azure-projects/pyproject.toml +++ b/sdk/projects/azure-projects/pyproject.toml @@ -1,11 +1,77 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=77.0.3", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "azure-projects" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Azure Projects Library for Python" +license = "MIT" +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "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", +] +requires-python = ">=3.8" +keywords = [ + "azure", + "azure sdk", + "azure projects", +] +version = "0.0.1a1" +dependencies = [ + "typing-extensions>=4.5", + "python-dotenv>=1.0.0", + "pyyaml>=6.0.2", + "azure-core>=1.31.0", + "azure-identity>=1.20", + "azure-appconfiguration-provider>=2.0.0", +] + +dynamic = ["readme"] +[project.optional-dependencies] +mcp = [ + "mcp>=1.6", + "makefun>=1.15", +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python" + +[tool.setuptools.dynamic] +readme = {file = [ + "README.md", + "CHANGELOG.md", +], content-type = "text/markdown"} + +[tool.setuptools.package-data] +"azure.projects" = ["py.typed"] + +[tool.setuptools.packages.find] +exclude = [ + "azure", + "tests", +] + [tool.azure-sdk-build] mypy = true type_check_samples = true verifytypes = true -# TODO: Get pyright passing pyright = false pylint = true black = true sphinx = true -# absolute_cov = true -# absolute_cov_percent = 80.00 diff --git a/sdk/projects/azure-projects/setup.py b/sdk/projects/azure-projects/setup.py deleted file mode 100644 index b7bda7624f6a..000000000000 --- a/sdk/projects/azure-projects/setup.py +++ /dev/null @@ -1,94 +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, find_packages -import os -from io import open -import re - - -PACKAGE_NAME = "azure-projects" -PACKAGE_PPRINT_NAME = "Projects" - -# 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: - long_description = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Azure {} Library for Python".format(PACKAGE_PPRINT_NAME), - # ensure that these are updated to reflect the package owners' information - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/Azure/azure-sdk-for-python", - keywords="azure, azure sdk, azure projects", # update with search keywords relevant to the azure service / product - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - license="MIT License", - # ensure that the development status reflects the status of your package - classifiers=[ - "Development Status :: 1 - Planning", - "Intended Audience :: Developers", - "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", - ], - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - # This means any folder structure that only consists of a __init__.py. - # For example, for storage, this would mean adding 'azure.storage' - # in addition to the default 'azure' that is seen here. - "azure", - ] - ), - include_package_data=True, - package_data={ - "azure.projects": ["py.typed"], - }, - install_requires=[ - "typing-extensions>=4.5", - "python-dotenv>=1.0.0", - "pyyaml>=6.0.2", - "azure-core>=1.31.0", - "azure-identity>=1.20", - "azure-appconfiguration-provider>=2.0.0", # TODO: This needs to be removed before GA. - ], - python_requires=">=3.8", - entry_points={ - "console_scripts": ["azproj=azure.projects._command:command"], - }, - extras_require={ - "mcp": [ - "mcp>=1.6", - "makefun>=1.15", - ], - }, - project_urls={ - "Bug Reports": "https://github.com/Azure/azure-sdk-for-python/issues", - "Source": "https://github.com/Azure/azure-sdk-for-python", - }, -)