Skip to content

Commit

Permalink
Update setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
n0n1m authored Aug 31, 2024
1 parent 9fdd3ac commit 3af6d6b
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,6 @@ def derive_version() -> str: # this function is stolen from discord.py
if not version:
raise RuntimeError('version is not set')

if version.endswith(('a', 'b', 'rc')):
# append version identifier based on commit count
try:
import subprocess

p = subprocess.Popen(['git', 'rev-list', '--count', 'HEAD'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
if out:
version += out.decode('utf-8').strip()
p = subprocess.Popen(['git', 'rev-parse', '--short', 'HEAD'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
if out:
version += '+g' + out.decode('utf-8').strip()
except Exception:
pass

return version

__version__ = derive_version()
Expand Down

0 comments on commit 3af6d6b

Please sign in to comment.