File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,10 @@ def get_repo():
137
137
138
138
def get_version ():
139
139
"""Get the current package version"""
140
+ if SETUP_PY .exists ():
141
+ warnings .warn ("Using deprecated setup.py invocation" )
142
+ return run ("python setup.py --version" ).split ("\n " )[- 1 ]
143
+
140
144
if PYPROJECT .exists ():
141
145
text = PYPROJECT .read_text (encoding = "utf-8" )
142
146
data = toml .loads (text )
@@ -153,10 +157,6 @@ def get_version():
153
157
if PACKAGE_JSON .exists ():
154
158
return json .loads (PACKAGE_JSON .read_text (encoding = "utf-8" )).get ("version" , "" )
155
159
156
- if SETUP_PY .exists ():
157
- warnings .warn ("Using deprecated setup.py invocation" )
158
- return run ("python setup.py --version" ).split ("\n " )[- 1 ]
159
-
160
160
raise ValueError ("No version identifier could be found!" )
161
161
162
162
You can’t perform that action at this time.
0 commit comments