File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,20 @@ def list2cmdline(cmd_list):
66
66
}
67
67
68
68
69
+ # -----------------------------------------------------------------------------
70
+ # Library Version
71
+ # -----------------------------------------------------------------------------
72
+
73
+ pkg_root_init_file = package_dir / "__init__.py"
74
+ for line in pkg_root_init_file .read_text ().split ("\n " ):
75
+ if line .startswith ("__version__ = " ):
76
+ package ["version" ] = eval (line .split ("=" , 1 )[1 ])
77
+ break
78
+ else :
79
+ print (f"No version found in { pkg_root_init_file } " )
80
+ sys .exit (1 )
81
+
82
+
69
83
# -----------------------------------------------------------------------------
70
84
# Requirements
71
85
# -----------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments