"git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "1861fbdeb51fc3ca306c3f1e1bb820fc3986f508"
Unverified Commit ca6fdd6d authored by Vasilis Vryniotis's avatar Vasilis Vryniotis Committed by GitHub
Browse files

Move version definition from setup.py to version.txt (#3202)

parent af5cb00c
...@@ -29,12 +29,14 @@ def get_dist(pkgname): ...@@ -29,12 +29,14 @@ def get_dist(pkgname):
return None return None
version = '0.9.0a0' cwd = os.path.dirname(os.path.abspath(__file__))
version_txt = os.path.join(cwd, 'version.txt')
with open(version_txt, 'r') as f:
version = f.readline().strip()
sha = 'Unknown' sha = 'Unknown'
package_name = 'torchvision' package_name = 'torchvision'
cwd = os.path.dirname(os.path.abspath(__file__))
try: try:
sha = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=cwd).decode('ascii').strip() sha = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=cwd).decode('ascii').strip()
except Exception: except Exception:
......
0.9.0a0
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment