diff --git a/grayskull/strategy/py_base.py b/grayskull/strategy/py_base.py index 224578965..fc04cfc92 100644 --- a/grayskull/strategy/py_base.py +++ b/grayskull/strategy/py_base.py @@ -707,6 +707,7 @@ def merge_setup_toml_metadata(setup_metadata: dict, pyproject_metadata: dict) -> setup_metadata = defaultdict(dict, setup_metadata) if not pyproject_metadata: return setup_metadata + setup_metadata["name"] = setup_metadata.get("name") or pyproject_metadata["name"] if pyproject_metadata["about"]["license"]: setup_metadata["license"] = pyproject_metadata["about"]["license"] if pyproject_metadata["about"]["summary"]: @@ -792,6 +793,7 @@ def get_sdist_metadata( dist = UnpackedSDist(path_pkg_info[0].parent) for key in ("name", "version", "summary", "author"): metadata[key] = getattr(dist, key, None) + return merge_setup_toml_metadata(metadata, pyproject_metadata) diff --git a/grayskull/strategy/py_toml.py b/grayskull/strategy/py_toml.py index a27deb6d0..d4ff4acab 100644 --- a/grayskull/strategy/py_toml.py +++ b/grayskull/strategy/py_toml.py @@ -259,6 +259,7 @@ def get_all_toml_info(path_toml: Union[Path, str]) -> dict: metadata["about"]["dev_url"] = all_urls.get("Source", None) metadata["about"]["home"] = all_urls.get("Homepage", None) metadata["about"]["summary"] = toml_project.get("description") + metadata["name"] = metadata.get("name") or toml_project.get("name") add_poetry_metadata(metadata, toml_metadata)