Why not use subprocess.run(“streamlit run app.py”) in your wrapper python executable? That should build and deploy as an executable OK as long as you have Streamlit in your build requirements. If you need command line arguments to streamlit as well see the subprocess docs.
If you need to setup virtual environments and/or environment variables then you can use something like this (which has the same effect as the @chekos batch file) for the startup command:
cmd /c “conda activate appenv & setenv.bat & streamlit run apps/app.py”
Where setenv.bat sets the environment variables you need. All my environments run like this (I use ConsoleZ for DOS shells and each tab is started with an appropriate variant of the above cmd string).
For the 'live" server for my business users I use the same cmd layout in a batch file which is configured in Task Scheduler to startup with the machine.
This setup makes deploying and switching between environments very easy.