Make mknet installable via pip
This commit is contained in:
parent
a13c37049a
commit
abccfb88b8
2 changed files with 12 additions and 5 deletions
|
@ -345,11 +345,12 @@ def destroy():
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if len(sys.argv) < 2:
|
if len(sys.argv) < 2:
|
||||||
print("""Usage:
|
progname = os.path.basename(sys.argv[0]) if len(sys.argv) > 0 else "mknet"
|
||||||
mk-testnet create [config_path] # create a new network. config_path defailt to config.yml
|
print(f"""Usage:
|
||||||
mk-testnet run-all <cmd> [args...] # run a command as each host. set the IP, NAME and ZONE environment variables
|
{progname} create [config_path] # create a new network. config_path defailt to config.yml
|
||||||
mk-testnet run <name> [cmd [args...]] # run command in host named <name>. Use zonename:name if multiple zones hosts server with same name. If cmd is empty, run a shell
|
{progname} run-all <cmd> [args...] # run a command as each host. set the IP, NAME and ZONE environment variables
|
||||||
mk-testnet destroy # destroy the current environment""")
|
{progname} run <name> [cmd [args...]] # run command in host named <name>. Use zonename:name if multiple zones hosts server with same name. If cmd is empty, run a shell
|
||||||
|
{progname} destroy # destroy the current environment""")
|
||||||
exit()
|
exit()
|
||||||
cmd = sys.argv[1]
|
cmd = sys.argv[1]
|
||||||
if cmd == "create":
|
if cmd == "create":
|
6
setup.py
Normal file
6
setup.py
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
from distutils.core import setup
|
||||||
|
setup(name='mknet',
|
||||||
|
version='1.0',
|
||||||
|
scripts=['mknet'],
|
||||||
|
py_modules=['net'],
|
||||||
|
)
|
Loading…
Reference in a new issue