Skip to content

Commit 94dd94d

Browse files
committed
Strip v from version
1 parent 63ca6c6 commit 94dd94d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

setup.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ def get_version():
3939
with open(os.path.join(DIR, 'include/libjsonnet.h')) as f:
4040
for line in f:
4141
if '#define' in line and 'LIB_JSONNET_VERSION' in line:
42-
return line.partition('LIB_JSONNET_VERSION')[2].strip('\n "')
42+
v_code = line.partition('LIB_JSONNET_VERSION')[2].strip('\n "')
43+
if v_code[0] == "v":
44+
v_code = v_code[1:]
4345

4446
class BuildJsonnetExt(BuildExt):
4547
def run(self):

0 commit comments

Comments
 (0)