From f1ca4b7bace1abd6217e3e9a2b0d1931b8f5a012 Mon Sep 17 00:00:00 2001 From: marcelotrevisani Date: Sun, 18 Oct 2020 10:38:04 +0100 Subject: [PATCH 1/2] Add test to cover the scenario --- tests/test_pypi.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_pypi.py b/tests/test_pypi.py index ed5036f65..87506ee8b 100644 --- a/tests/test_pypi.py +++ b/tests/test_pypi.py @@ -645,3 +645,8 @@ def test_clean_deps_for_conda_forge(): "deps1", "deps2 # [py<38]", ] + + +def test_empty_entry_points(): + recipe = PyPi(name="modulegraph", version="0.18") + assert recipe["build"]["entry_points"] == "modulegraph = modulegraph.__main__:main" From 1ff9005905680587d8f411d6dd19df07a31d3096 Mon Sep 17 00:00:00 2001 From: marcelotrevisani Date: Sun, 18 Oct 2020 10:40:27 +0100 Subject: [PATCH 2/2] Remove empty entry_points --- grayskull/pypi/pypi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grayskull/pypi/pypi.py b/grayskull/pypi/pypi.py index 9ea42e3ce..38a6b6df1 100644 --- a/grayskull/pypi/pypi.py +++ b/grayskull/pypi/pypi.py @@ -466,7 +466,7 @@ def _get_entry_points_from_sdist(sdist_metadata: dict) -> List: return_entry_point = [] for entry_point in entry_points_result: return_entry_point.extend(entry_point.split("\n")) - return return_entry_point + return [ep for ep in return_entry_point if ep.strip()] return [] @staticmethod