WIP add entrypoint

This commit is contained in:
nolash 2021-12-05 08:12:36 +01:00
parent 46b109b088
commit d24b1666b2
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
5 changed files with 20 additions and 8 deletions

4
CHANGELOG Normal file
View File

@ -0,0 +1,4 @@
- 0.0.2
* Add executable entry point in package install
- 0.0.1
* Token creation setup for eth

View File

@ -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)

View File

@ -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:
try:
cmd_mod.execute(config, args)
#except ValueError as e:
# logg.error('{}'.format(e))
# sys.exit(1)
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()

View File

@ -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

View File

@ -27,5 +27,9 @@ setup(
extras_require={
'eth': eth_requirements,
},
entry_points={
'console_scripts': [
'cic-cli=cic.runnable.cic_cmd:main',
],
},
)