Skip to content

Commit

Permalink
comment updates as per feedback from mccoy
Browse files Browse the repository at this point in the history
  • Loading branch information
scbedd committed Oct 21, 2024
1 parent d57f79d commit 089abc5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
23 changes: 23 additions & 0 deletions tools/azure-sdk-tools/ci_tools/parsing/parse_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,25 @@ def setup(*args, **kwargs):
def parse_pyproject(
pyproject_filename: str,
) -> Tuple[str, str, str, List[str], bool, str, str, Dict[str, Any], bool, List[str], List[str], str, List[Extension]]:
"""
Used to evaluate a pyproject (or a directory containing a pyproject.toml) with a [project] configuration within.
Returns a tuple containing:
(
<package-name>,
<package_version>,
<python_requires>,
<requires>,
<boolean indicating track1 vs track2>,
<parsed setup.py location>,
<namespace>,
<package_data dict>,
<include_package_data bool>,
<classifiers>,
<keywords>,
<ext_packages>,
<ext_modules>
)
"""
toml_dict = get_pyproject_dict(pyproject_filename)

project_config = toml_dict.get("project", None)
Expand All @@ -351,6 +370,8 @@ def parse_pyproject(
parsed_version = parsed_version.group(1)
else:
parsed_version = "0.0.0"
else:
raise ValueError(f"Unable to find a version value directly set in \"{pyproject_filename}\", nor is it available in a \"version.py\" or \"_version.py.\"")

name = project_config.get("name")
version = parsed_version
Expand Down Expand Up @@ -449,6 +470,8 @@ def parse_setup(
<ext_packages>,
<ext_modules>
)
If a pyproject.toml (containing [project]) or a setup.py is NOT found, a ValueError will be raised.
"""
targeted_path = setup_filename_or_folder
if os.path.isfile(setup_filename_or_folder):
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The `pyproject.toml` and `setup.py` files in this folder are used to verify successful azure-sdk build configuration from a parsed setup.py.
The `pyproject.toml` and `setup.py` files in this folder are used to verify successful azure-sdk build configuration from a parsed configuration file.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = [
{name = "Microsoft Corporation", email = "azurekeyvault@microsoft.com"}
]
description = "Microsoft Azure Key Vault Keys Client Library for Python"
requires-python = ">=3.7"
requires-python = ">=3.8"
license = {text = "MIT License"}
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand Down

0 comments on commit 089abc5

Please sign in to comment.