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 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"