WIP add entrypoint
This commit is contained in:
parent
46b109b088
commit
d24b1666b2
4
CHANGELOG
Normal file
4
CHANGELOG
Normal file
@ -0,0 +1,4 @@
|
||||
- 0.0.2
|
||||
* Add executable entry point in package install
|
||||
- 0.0.1
|
||||
* Token creation setup for eth
|
@ -25,6 +25,8 @@ def validate_args(args):
|
||||
|
||||
|
||||
def execute(config, eargs):
|
||||
logg.info('initializing in {}'.format(eargs.directory))
|
||||
|
||||
os.makedirs(eargs.directory)
|
||||
|
||||
ct = Token(eargs.directory, name=eargs.name, symbol=eargs.symbol, precision=eargs.precision)
|
||||
|
@ -39,6 +39,7 @@ args = argparser.parse_args(sys.argv[1:])
|
||||
|
||||
if args.command == None:
|
||||
logg.critical('Subcommand missing')
|
||||
sys.stderr.write("\033[;91m" + 'subcommand missing' + "\033[;39m\n")
|
||||
sys.exit(1)
|
||||
|
||||
modname = 'cic.cmd.{}'.format(args.command)
|
||||
@ -51,11 +52,12 @@ extra_args = {
|
||||
config = chainlib.cli.Config.from_args(args, arg_flags=arg_flags, base_config_dir=base_config_dir, extra_args=extra_args)
|
||||
|
||||
def main():
|
||||
#try:
|
||||
cmd_mod.execute(config, args)
|
||||
#except ValueError as e:
|
||||
# logg.error('{}'.format(e))
|
||||
# sys.exit(1)
|
||||
try:
|
||||
cmd_mod.execute(config, args)
|
||||
except Exception as e:
|
||||
logg.exception(e) #'{}'.format(e))
|
||||
sys.stderr.write("\033[;91m" + str(e) + "\033[;39m\n")
|
||||
sys.exit(1)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -1,10 +1,10 @@
|
||||
[metadata]
|
||||
name = cic
|
||||
version = 0.0.1
|
||||
version = 0.0.2
|
||||
description = Generic cli tooling for the CIC token network
|
||||
author = Louis Holbrook
|
||||
author_email = dev@holbrook.no
|
||||
url = https://gitlab.com/chaintools/chainlib
|
||||
url = https://git.grassecon.net/cic-cli.git
|
||||
keywords =
|
||||
dlt
|
||||
blockchain
|
||||
|
Loading…
Reference in New Issue
Block a user