Skip to content

Commit f42a76a

Browse files
authored
need check for metapackages on pyporject.toml (#45802)
1 parent 5c8632f commit f42a76a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,11 @@ def parse_pyproject(
692692
include_package_data = get_value_from_dict(toml_dict, "tool.setuptools.include-package-data", True)
693693
classifiers = project_config.get("classifiers", [])
694694
keywords = project_config.get("keywords", [])
695-
metapackage = False
695+
696+
# A metapackage has no actual Python source packages (mirroring parse_setup_py behavior).
697+
# Detect by checking if there's no packages.find config AND no discoverable namespace with source files.
698+
packages_find = get_value_from_dict(toml_dict, "tool.setuptools.packages.find", None)
699+
metapackage = packages_find is None and not discovered_namespace
696700

697701
# as of setuptools 74.1 ext_packages and ext_modules are now present in tool.setuptools config namespace
698702
ext_package = get_value_from_dict(toml_dict, "tool.setuptools.ext-package", None)

0 commit comments

Comments
 (0)