[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 README.rst
|
||||||
include bash-autocompletion/lutin
|
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 = arguments.Arguments()
|
||||||
myArgs.add("h", "help", desc="Display this help")
|
myArgs.add("h", "help", desc="Display this help")
|
||||||
myArgs.add("H", "HELP", desc="Display this help (with all compleate information)")
|
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_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("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")
|
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")
|
print(" ex gcov with output: " + sys.argv[0] + " -cgcc --gcov -mdebug etk-test?build?run etk?gcov:output")
|
||||||
exit(0)
|
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):
|
def check_boolean(value):
|
||||||
if value == "" \
|
if value == "" \
|
||||||
or value == "1" \
|
or value == "1" \
|
||||||
@ -188,6 +202,10 @@ def parseGenericArg(argument, active):
|
|||||||
if active == False:
|
if active == False:
|
||||||
usage()
|
usage()
|
||||||
return True
|
return True
|
||||||
|
if argument.get_option_name() == "version":
|
||||||
|
if active == False:
|
||||||
|
version()
|
||||||
|
return True
|
||||||
if argument.get_option_name() == "HELP":
|
if argument.get_option_name() == "HELP":
|
||||||
if active == False:
|
if active == False:
|
||||||
usage(True)
|
usage(True)
|
||||||
|
3
setup.py
3
setup.py
@ -37,7 +37,8 @@ setup(name='lutin',
|
|||||||
packages=['lutin',
|
packages=['lutin',
|
||||||
'lutin/z_builder',
|
'lutin/z_builder',
|
||||||
'lutin/z_system',
|
'lutin/z_system',
|
||||||
'lutin/z_target'],
|
'lutin/z_target',
|
||||||
|
],
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 5 - Production/Stable',
|
'Development Status :: 5 - Production/Stable',
|
||||||
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
|
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user