nebius/SWE-bench-extra huggingface dataset:
Repository: dhatim/python-license-check

Issue:
Editable requirements (-e) raises "DistributionNotFound: The 'None' distribution was not found"
Editable requirements, i.e: rows like this one
`-e file:some_internal_package              # via -r requirements.in`

Are currently making this library fail with `pkg_resources.DistributionNotFound: The 'None' distribution was not found and is required by the application`

This is kind of related to https://github.com/dhatim/python-license-check/issues/33 but although error message is the same, it is actually a different problem as that one relates to `git+https://` construct, and this one, to the `-e` construct

Comments:

Patch:
diff --git a/liccheck/requirements.py b/liccheck/requirements.py
index 8bfc446..8c8e106 100644
--- a/liccheck/requirements.py
+++ b/liccheck/requirements.py
@@ -25,6 +25,10 @@ def parse_requirements(requirement_file):
     for req in pip_parse_requirements(requirement_file, session=PipSession()):
         install_req = install_req_from_parsed_requirement(req)
         if install_req.markers and not pkg_resources.evaluate_marker(str(install_req.markers)):
+            # req should not installed due to env markers
+            continue
+        elif install_req.editable:
+            # skip editable req as they are failing in the resolve phase
             continue
         requirements.append(pkg_resources.Requirement.parse(str(install_req.req)))
     return requirements


Test patch:
diff --git a/tests/test_get_packages_info.py b/tests/test_get_packages_info.py
index 1ec99b0..8daadbe 100644
--- a/tests/test_get_packages_info.py
+++ b/tests/test_get_packages_info.py
@@ -11,6 +11,7 @@ def test_license_strip(tmpfile):
     tmpfh.close()
     assert get_packages_info(tmppath)[0]["licenses"] == ["MIT"]
 
+
 def test_requirements_markers(tmpfile):
     tmpfh, tmppath = tmpfile
     tmpfh.write(
@@ -24,6 +25,19 @@ def test_requirements_markers(tmpfile):
         assert len(get_packages_info(tmppath)) == 1
 
 
+def test_editable_requirements_get_ignored(tmpfile):
+    tmpfh, tmppath = tmpfile
+    tmpfh.write(
+        "-e file:some_editable_req\n"
+        "pip\n"
+    )
+    tmpfh.close()
+
+    packages_info = get_packages_info(tmppath)
+    assert len(packages_info) == 1
+    assert packages_info[0]["name"] == "pip"
+
+
 @pytest.mark.parametrize(
     ('no_deps', 'expected_packages'), (
         pytest.param(