diff --git a/setup.py b/setup.py index da154ec14b2..e8a3ecd9ac7 100644 --- a/setup.py +++ b/setup.py @@ -29,12 +29,14 @@ def get_dist(pkgname): 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' package_name = 'torchvision' -cwd = os.path.dirname(os.path.abspath(__file__)) - try: sha = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=cwd).decode('ascii').strip() except Exception: diff --git a/version.txt b/version.txt new file mode 100644 index 00000000000..ddf3a6311c3 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +0.9.0a0 \ No newline at end of file