Assume the following code under src/app.py
:
def main():
assert False
if __name__ == "__main__":
main()
Running this using python -o src/app.py
will work fine as the assertions are disabled.
How can I package a zipapp (python -m zipapp src -m "app:main"
) such that when it is double-clicked or run, it'll automatically run as optimized?
I've tried changing the extension to .pyo
and it still resulted in an AssertionError
.