File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 1414
1515
1616def 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__ = ['\"]([^'\"]*)['\"]"
17+ # get version string from _version.py
18+ version_file = os .path .join (os .path .dirname (__file__ ), "torchx/_version.py" )
19+ version_regex = r"BASE_VERSION = ['\"]([^'\"]*)['\"]"
2120 with open (version_file , "r" ) as f :
2221 version = re .search (version_regex , f .read (), re .M ).group (1 )
2322 return version
Original file line number Diff line number Diff line change 1+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2+ # All rights reserved.
3+ #
4+ # This source code is licensed under the BSD-style license found in the
5+ # LICENSE file in the root directory of this source tree.
6+
7+ # pyre-strict
8+ BASE_VERSION = "0.8.0dev0"
Original file line number Diff line number Diff line change 1- #!/usr/bin/env python3
21# Copyright (c) Meta Platforms, Inc. and affiliates.
32# All rights reserved.
43#
76
87# pyre-strict
98
9+ from torchx ._version import BASE_VERSION
1010from torchx .util .entrypoints import load
1111
1212# Follows PEP-0440 version scheme guidelines
1818# 0.1.0bN # Beta release
1919# 0.1.0rcN # Release Candidate
2020# 0.1.0 # Final release
21- __version__ = "0.8.0dev0"
21+ __version__ : str = BASE_VERSION
2222
2323
2424# Use the github container registry images corresponding to the current package
You can’t perform that action at this time.
0 commit comments