[DEV] correct the wrong version number when install
This commit is contained in:
parent
843c1296a6
commit
58602345b5
@ -1,2 +1,3 @@
|
||||
include README.rst
|
||||
include bash-autocompletion/lutin
|
||||
include version.txt
|
||||
|
18
bin/lutin
18
bin/lutin
@ -28,6 +28,7 @@ import lutin.tools as lutinTools
|
||||
myArgs = arguments.Arguments()
|
||||
myArgs.add("h", "help", desc="Display this help")
|
||||
myArgs.add("H", "HELP", desc="Display this help (with all compleate information)")
|
||||
myArgs.add("", "version", desc="Display the application version")
|
||||
myArgs.add_section("option", "Can be set one time in all case")
|
||||
myArgs.add("v", "verbose", list=[["0","None"],["1","error"],["2","warning"],["3","info"],["4","debug"],["5","verbose"],["6","extreme_verbose"]], desc="display makefile debug level (verbose) default =2")
|
||||
myArgs.add("C", "color", desc="Display makefile output in color")
|
||||
@ -172,6 +173,19 @@ def usage(full=False):
|
||||
print(" ex gcov with output: " + sys.argv[0] + " -cgcc --gcov -mdebug etk-test?build?run etk?gcov:output")
|
||||
exit(0)
|
||||
|
||||
|
||||
##
|
||||
## @brief Display the version of this package.
|
||||
##
|
||||
def version():
|
||||
color = debug.get_color_set()
|
||||
import pkg_resources
|
||||
print("version: " + str(pkg_resources.get_distribution('lutin').version))
|
||||
foldername = os.path.dirname(__file__)
|
||||
print("source folder is: " + foldername)
|
||||
exit(0)
|
||||
|
||||
|
||||
def check_boolean(value):
|
||||
if value == "" \
|
||||
or value == "1" \
|
||||
@ -188,6 +202,10 @@ def parseGenericArg(argument, active):
|
||||
if active == False:
|
||||
usage()
|
||||
return True
|
||||
if argument.get_option_name() == "version":
|
||||
if active == False:
|
||||
version()
|
||||
return True
|
||||
if argument.get_option_name() == "HELP":
|
||||
if active == False:
|
||||
usage(True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user