Skip to content

Commit 27ff7e8

Browse files
authored
Fix xpk version error when cloned from git (#423)
* Fix xpk version error when cloned from git * remove git hash
1 parent c7fe57d commit 27ff7e8

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/xpk/commands/version.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,4 @@ def get_xpk_version() -> str:
2424

2525
def version(args) -> None: # pylint: disable=unused-argument
2626
"""Get version of xpk."""
27-
xpk_version, git_hash = __version__.split('+')
28-
xpk_print('xpk_version:', xpk_version)
29-
xpk_print('git commit hash:', git_hash)
27+
xpk_print('xpk_version:', __version__)

src/xpk/core/config.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
limitations under the License.
1515
"""
1616

17-
import importlib.metadata as importlib_metadata
1817
import os
1918
import re
2019

@@ -25,8 +24,8 @@
2524
from .system_characteristics import AcceleratorType, SystemCharacteristics
2625

2726
# This is the version for XPK PyPI package
28-
__version__ = importlib_metadata.version('xpk')
29-
XPK_CURRENT_VERSION = __version__.split('+')[0]
27+
__version__ = 'v0.6.0'
28+
XPK_CURRENT_VERSION = __version__
3029
XPK_CONFIG_FILE = os.path.expanduser('~/.config/xpk/config.yaml')
3130

3231
CONFIGS_KEY = 'configs'

0 commit comments

Comments
 (0)