Forward dream.py to invoke.py using the same interpreter, add deprecation warning

This commit is contained in:
db3000 2022-10-13 01:06:10 -04:00 committed by Lincoln Stein
parent cac3f5fc61
commit 203a6d8a00

View File

@ -1,12 +1,10 @@
#!/usr/bin/env python3
# Copyright (c) 2022 Lincoln D. Stein (https://github.com/lstein)
import sys
import os.path
script_path = sys.argv[0]
script_args = sys.argv[1:]
script_dir,script_name = os.path.split(script_path)
script_dest = os.path.join(script_dir,'invoke.py')
os.execlp('python3','python3',script_dest,*script_args)
import warnings
import invoke
if __name__ == '__main__':
warnings.warn("dream.py is deprecated, please run invoke.py instead",
DeprecationWarning)
invoke.main()