MCPcopy Create free account
hub / github.com/DragonisCV/RAM / write_version_py

Function write_version_py

setup.py:59–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57
58
59def write_version_py():
60 content = """# GENERATED VERSION FILE
61# TIME: {}
62__version__ = '{}'
63__gitsha__ = '{}'
64version_info = ({})
65"""
66 sha = get_hash()
67 with open('VERSION', 'r') as f:
68 SHORT_VERSION = f.read().strip()
69 VERSION_INFO = ', '.join([x if x.isdigit() else f'"{x}"' for x in SHORT_VERSION.split('.')])
70
71 version_file_str = content.format(time.asctime(), SHORT_VERSION, sha, VERSION_INFO)
72 with open(version_file, 'w') as f:
73 f.write(version_file_str)
74
75
76def get_version():

Callers 1

setup.pyFile · 0.85

Calls 1

get_hashFunction · 0.85

Tested by

no test coverage detected