Skip to content

Commit

Permalink
fix: ignore invalid python tags
Browse files Browse the repository at this point in the history
Signed-off-by: Frost Ming <[email protected]>
  • Loading branch information
frostming committed Jul 15, 2024
1 parent a7a7b5f commit 663bbb4
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions src/dep_logic/tags/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,22 +165,25 @@ def _evaluate_python(
.replace("pyston", "pt")
.lower()
)
if impl == "cp" and abi_impl == "abi3":
if (
parse_version_specifier(f">={major}.{minor or 0}")
& self.requires_python
).is_empty():
try:
if impl == "cp" and abi_impl == "abi3":
if (
parse_version_specifier(f">={major}.{minor or 0}")
& self.requires_python
).is_empty():
return None
return (int(major), int(minor or 0), 1) # 1 for abi3
# cp36-cp36m-*
# cp312-cp312m-*
# pp310-pypy310_pp75-*
if abi_impl != "none" and not abi_impl.startswith(python_tag.lower()):
return None
return (int(major), int(minor or 0), 1) # 1 for abi3
# cp36-cp36m-*
# cp312-cp312m-*
# pp310-pypy310_pp75-*
if abi_impl != "none" and not abi_impl.startswith(python_tag.lower()):
if major and minor:
wheel_range = parse_version_specifier(f"=={major}.{minor}.*")
else:
wheel_range = parse_version_specifier(f"=={major}.*")
except InvalidSpecifier:
return None
if major and minor:
wheel_range = parse_version_specifier(f"=={major}.{minor}.*")
else:
wheel_range = parse_version_specifier(f"=={major}.*")
if (wheel_range & self.requires_python).is_empty():
return None
return (int(major), int(minor or 0), 0 if abi_impl == "none" else 2)
Expand Down

0 comments on commit 663bbb4

Please sign in to comment.