Skip to content

Commit d67ab8c

Browse files
authored
Merge pull request #3051 from boutproject/python-backend
Minor fixes for the python backend
2 parents b7334b6 + 8f32864 commit d67ab8c

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

tools/pylib/_boutpp_build/backend.py

100644100755
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/python3
2+
13
import os # corelib
24
import glob # corelib
35
import hashlib # corelib
@@ -348,12 +350,19 @@ def help():
348350
print(fmt % row)
349351

350352

353+
def printVersion():
354+
"""
355+
print the version
356+
"""
357+
print(getversion())
358+
359+
351360
todos = dict(
352361
nightly=nightly,
353362
sdist=sdist,
354363
wheel=wheel,
355364
dist=dist,
356-
version=lambda: print(getversion()),
365+
version=printVersion,
357366
help=help,
358367
)
359368
todos.update(
@@ -368,4 +377,7 @@ def help():
368377
import sys
369378

370379
for todo in sys.argv[1:]:
380+
if todo not in todos:
381+
help()
382+
sys.exit(1)
371383
todos[todo]()

0 commit comments

Comments
 (0)