Skip to content

Commit

Permalink
Refactor setup.py: Modify version tagging logic to temporarily adjust…
Browse files Browse the repository at this point in the history
… version for acceleration
  • Loading branch information
royshil committed Oct 30, 2024
1 parent f84c3cb commit 4136426
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ def get_tag(self):
python, abi, platform = super().get_tag()
acceleration = os.environ.get("SIMPLER_WHISPER_ACCELERATION", "")
if acceleration:
# This creates the +cuda or +cpu tag
self.distribution.version += f"+{acceleration}"
# Store original version
orig_version = self.distribution.get_version()
# Temporarily modify version
self.distribution.metadata.version = f"{orig_version}+{acceleration}"
return python, abi, platform


Expand Down

0 comments on commit 4136426

Please sign in to comment.