[TELE-596] add b prefix to string (trying to fix jenkins build error)
This commit is contained in:
parent
2c7c949b75
commit
d1f2fb0ad8
8
setup.py
8
setup.py
|
@ -31,16 +31,14 @@ class eo_sdist(sdist):
|
|||
|
||||
def get_version():
|
||||
if os.path.exists('VERSION'):
|
||||
version_file = open('VERSION', 'r')
|
||||
version = version_file.read()
|
||||
version_file.close()
|
||||
return version
|
||||
with open('VERSION', 'r') as v:
|
||||
return v.read()
|
||||
if os.path.exists('.git'):
|
||||
p = subprocess.Popen(['git', 'describe', '--dirty', '--match=v*'], stdout=subprocess.PIPE)
|
||||
result = p.communicate()[0]
|
||||
if p.returncode == 0:
|
||||
version = result.split()[0][1:]
|
||||
version = version.replace('-', '.')
|
||||
version = version.replace(b'-', b'.')
|
||||
return version
|
||||
return '0'
|
||||
|
||||
|
|
Loading…
Reference in New Issue