Building a PYZ exec
my_app.py
from termcolor import cprint
def my_main():
print('hello world')
cprint('hola mundo', 'red')
if __name__ == '__main__':
my_main()
And then package with something like that:
mkdir build
mkdir dist
python -m pip install termcolor --target build
cp my_app.py build
python -m zipapp build --main my_app:my_main --output dist/my_app.pyz