Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 53 additions & 3 deletions sdk/storage/azure-storage-extensions/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
# --------------------------------------------------------------------------
# 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-storage-extensions"
authors = [
{ name = "Microsoft Corporation", email = "ascl@microsoft.com" },
]
description = "Azure Storage Extensions"
license = "MIT"
Comment thread
kashifkhan marked this conversation as resolved.
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"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",
]
requires-python = ">=3.10"
keywords = ["azure", "azure sdk"]
dynamic = ["version", "readme"]

[project.urls]
repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-extensions"

[tool.setuptools.dynamic]
version = { attr = "azure.storage.extensions.checksums._version.VERSION" }
readme = { file = ["README.md"], content-type = "text/markdown" }

[tool.setuptools.packages.find]
exclude = [
"tests*",
"samples*",
"doc*",
"azure",
"azure.storage",
"azure.storage.extensions",
]

[tool.setuptools.package-data]
"azure.storage.extensions.checksums" = ["py.typed", "*.pyi"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be needed as I believe setuptools picks these by default. You can try removing and checking the wheel contents


[tool.azure-sdk-build]
mypy = false
pyright = false
Expand All @@ -12,9 +63,8 @@ breaking = false
# these can be any number of suppressions. note that * present means that ALL warnings will be suppressed for this package
suppressed_skip_warnings = ["*"]

[build-system]
# cibuildwheel is NOT a build-system dependency; it is the outer orchestration tool
requires = ["setuptools", "wheel"]
[tool.azure-sdk-conda]
in_bundle = false

[tool.cibuildwheel]
build = ["cp310*", "pp310*", "pp311*"]
Expand Down
52 changes: 9 additions & 43 deletions sdk/storage/azure-storage-extensions/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
# license information.
# --------------------------------------------------------------------------

import os
import re
# This file remains only for two things that setuptools cannot yet express
# declaratively in pyproject.toml without opting into experimental config:
# 1. Compiling the limited-API C extension(s).
# 2. Overriding bdist_wheel so wheels built against Py_LIMITED_API are
# tagged abi3 and become reusable across CPython 3.x versions.
# Can be removed once experimental is removed from https://github.com/pypa/setuptools/blob/84ed5913724df5a12dc804e1d5efe12508e706d2/setuptools/config/pyprojecttoml.py#L135

from setuptools import setup, Extension
from wheel.bdist_wheel import bdist_wheel
from setuptools.command.bdist_wheel import bdist_wheel


class bdist_wheel_abi3(bdist_wheel):
Expand All @@ -21,51 +26,12 @@ def get_tag(self):
return python, abi, plat


PACKAGE_NAME = "azure-storage-extensions"
PACKAGE_PPRINT_NAME = "Azure Storage Extensions"

package_folder_path = PACKAGE_NAME.replace("-", "/")

# Version extraction inspired from 'requests'
with open(os.path.join(package_folder_path, "checksums", "_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=PACKAGE_PPRINT_NAME,
long_description=open("README.md", "r", encoding="utf-8").read(),
long_description_content_type="text/markdown",
license="MIT",
author="Microsoft Corporation",
author_email="ascl@microsoft.com",
url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-extensions",
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.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,
python_requires=">=3.10",
packages=[
"azure.storage.extensions.checksums",
],
ext_package="azure.storage.extensions.checksums",
ext_modules=[
Extension(
"crc64",
[os.path.join(package_folder_path, "checksums", "crc64", "crc64module.c")],
["azure/storage/extensions/checksums/crc64/crc64module.c"],
define_macros=[("Py_LIMITED_API", "3")],
py_limited_api=True,
),
Expand Down
Loading