File tree Expand file tree Collapse file tree 3 files changed +13
-13
lines changed Expand file tree Collapse file tree 3 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 55# This source code is licensed under the BSD-style license found in the
66# LICENSE file in the root directory of this source tree.
77
8- import os
9- import re
108import sys
119from datetime import date
1210
1311from setuptools import find_packages , setup
1412
15-
16- def get_version ():
17- # get version string from version.py
18- # TODO: ideally the version.py should be generated when setup is run
19- version_file = os .path .join (os .path .dirname (__file__ ), "torchx/version.py" )
20- version_regex = r"__version__ = ['\"]([^'\"]*)['\"]"
21- with open (version_file , "r" ) as f :
22- version = re .search (version_regex , f .read (), re .M ).group (1 )
23- return version
13+ from torchx .base_version_gen import BASE_VERSION
2414
2515
2616def get_nightly_version ():
@@ -49,7 +39,7 @@ def get_nightly_version():
4939 with open ("dev-requirements.txt" ) as f :
5040 dev_reqs = f .read ()
5141
52- version = get_nightly_version () if is_nightly else get_version ()
42+ version = get_nightly_version () if is_nightly else BASE_VERSION
5343 print (f"-- { name } building version: { version } " )
5444
5545 setup (
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+ # Copyright (c) Meta Platforms, Inc. and affiliates.
3+ # All rights reserved.
4+ #
5+ # This source code is licensed under the BSD-style license found in the
6+ # LICENSE file in the root directory of this source tree.
7+
8+ # pyre-strict
9+ BASE_VERSION = "0.8.0dev0"
Original file line number Diff line number Diff line change 77
88# pyre-strict
99
10+ from torchx .base_version_gen import BASE_VERSION
1011from torchx .util .entrypoints import load
1112
1213# Follows PEP-0440 version scheme guidelines
1819# 0.1.0bN # Beta release
1920# 0.1.0rcN # Release Candidate
2021# 0.1.0 # Final release
21- __version__ = "0.8.0dev0"
22+ __version__ = BASE_VERSION
2223
2324
2425# Use the github container registry images corresponding to the current package
You can’t perform that action at this time.
0 commit comments