Skip to content

Commit e22e1ac

Browse files
lmazuelscbeddCopilotswathipil
authored
Move KV Keys to pyproject.toml (#39100)
* Move KV Keys to pyproject.toml * Add keywords * Update version extraction * tiny update to get_package_properties so that our pure pyproject.toml packages can flow through * temporarily continue on error from twine verify readme so we can see the rest of the failures * cleaning up remaining references to setup.py. it is mostly as simple as removing the assumed setup.py in favor of just using the package directory * repair mindependency * ensure that build failures are checked in create_package, add build to the set of dependencies that are installed (so that installing pure pyproject.toml packages does not fail). this repairs the depends tox environment * Explicit MD content-type for readme * there are no adjustments necessary to make the requirement version updates work. * Exclude tests and samples * still need to traverse the __init__ but this should be a green build now * patch azure-sdk-tools workflow to make it passing * Apply suggestions from code review Co-authored-by: Copilot <[email protected]> * we were finding _version files under the .tox folder * Update eng/test_tools.txt --------- Co-authored-by: Scott Beddall <[email protected]> Co-authored-by: Scott Beddall <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: swathipil <[email protected]> Co-authored-by: swathipil <[email protected]>
1 parent afeb13c commit e22e1ac

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,48 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "azure-keyvault-keys"
7+
authors = [
8+
{name = "Microsoft Corporation", email = "[email protected]"},
9+
]
10+
description = "Microsoft Corporation Azure Key Vault Keys Client Library for Python"
11+
keywords = ["azure", "azure sdk"]
12+
requires-python = ">=3.9"
13+
license = {text = "MIT License"}
14+
classifiers = [
15+
"Development Status :: 5 - Production/Stable",
16+
"Programming Language :: Python",
17+
"Programming Language :: Python :: 3 :: Only",
18+
"Programming Language :: Python :: 3",
19+
"Programming Language :: Python :: 3.9",
20+
"Programming Language :: Python :: 3.10",
21+
"Programming Language :: Python :: 3.11",
22+
"Programming Language :: Python :: 3.12",
23+
"Programming Language :: Python :: 3.13",
24+
"License :: OSI Approved :: MIT License",
25+
]
26+
dependencies = [
27+
"azure-core>=1.31.0",
28+
"cryptography>=2.1.4",
29+
"isodate>=0.6.1",
30+
"typing-extensions>=4.6.0",
31+
]
32+
dynamic = ["version", "readme"]
33+
34+
[project.urls]
35+
repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk"
36+
37+
[tool.setuptools.dynamic]
38+
version = {attr = "azure.keyvault.keys._version.VERSION"}
39+
readme = {file = ["README.md"], content-type = "text/markdown"}
40+
41+
[tool.setuptools.packages.find]
42+
exclude = ["samples*", "tests*", "azure", "azure.keyvault"]
43+
44+
[tool.setuptools.package-data]
45+
pytyped = ["py.typed"]
46+
147
[tool.azure-sdk-build]
248
pyright = false

tools/azure-sdk-tools/ci_tools/parsing/parse_functions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ def parse_pyproject(
371371
# "give me the package metadata for this folder."
372372
# We can avoid this expensive operation if we parse the version out of the _version or version file directly.
373373
parsed_version = project_config.get("version", None)
374+
374375
if not parsed_version:
375376
parsed_version_py = get_version_py(pyproject_filename)
376377

@@ -447,6 +448,7 @@ def get_version_py(setup_path: str) -> Optional[str]:
447448
"local",
448449
"scripts",
449450
"images",
451+
".tox"
450452
}
451453

452454
file_path, _ = os.path.split(setup_path)

0 commit comments

Comments
 (0)