diff --git a/src/e3/python/pypi.py b/src/e3/python/pypi.py index 5019df4d..8a159b9c 100644 --- a/src/e3/python/pypi.py +++ b/src/e3/python/pypi.py @@ -217,7 +217,7 @@ def fetch_candidates( for link in project_links: try: c = PyPICandidate( - identifier=identifier, + identifier=identifier.split("@", 1)[0], link=link, extras=extras, cache_dir=os.path.join(self.cache_dir, "resources"), @@ -379,9 +379,14 @@ def requirements(self, env: dict[str, str]) -> set[Requirement]: elif line and not line.startswith("#"): # Non empty lines that are not comments should be # considered as requirements - self._reqs.add( - Requirement(f"{line};{current_marker}") - ) + if current_marker: + self._reqs.add( + Requirement(f"{line};{current_marker}") + ) + else: + # Don't emit a final ; if the marker is empty + # as this is not accepted by the syntax + self._reqs.add(Requirement(line)) elif requirements_txt in archive_members: # Check if there is a requirements.txt (this is a fallback)