Skip to content

Commit

Permalink
Fix package version of PyQUDA-Utils.
Browse files Browse the repository at this point in the history
  • Loading branch information
SaltyChiang committed Nov 5, 2024
1 parent 47112c8 commit b513491
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
from setuptools import setup

if "egg_info" in sys.argv or "sdist" in sys.argv:
describe = os.popen("git describe --tags", "r").read()
describe = os.popen("git describe --tags", "r").read().strip()
if describe != "":
tag, post, hash = describe.strip().split("-")
if "-" in describe:
tag, post, _ = describe.split("-")
else:
tag, post = describe, 0
with open(os.path.join(os.path.dirname(__file__), "pyquda_utils", "_version.py"), "w") as f:
f.write(f'__version__ = "{tag[1:]}.dev{post}"\n')

Expand Down

0 comments on commit b513491

Please sign in to comment.