Skip to content

Commit

Permalink
Fix issue that no valid semantic version tag found when installing bi…
Browse files Browse the repository at this point in the history
…tsandbytes from source in personal repo (#1419)
  • Loading branch information
statelesshz authored Nov 20, 2024
1 parent cd3cb68 commit cd73601
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def get_latest_semver_tag():
tags = subprocess.check_output(["git", "tag"], text=True).splitlines()
semver_tags = [tag for tag in tags if tag.count(".") == 2 and all(part.isdigit() for part in tag.split("."))]
if not semver_tags:
raise ValueError("No valid semantic version tags found")
print("No valid semantic version tags found, use 0.0.1 defaultly")
semver_tags = ["0.0.1"]
return sorted(semver_tags, key=lambda s: list(map(int, s.split("."))))[-1]


Expand Down

0 comments on commit cd73601

Please sign in to comment.