Tuesday, October 01, 2013

Flask and pyinstaller notice

I have started to test flask and pyinstaller setup in wine/linux

first i needed to install flask with pip

wine cmd.exe
c:\\python27\\scripts\\pip install flask

then after i have created the hello world flask needs to be added in the --hidden-import at command line like this

c:\\python27\\scripts\\pyinstaller --hidden-import=flask --onefile -d -y hello.py


and you can start it with
dist\hello.exe
* Running on http://127.0.0.1:5000/


Then load in your browser :) The size of the single file binary
 
ls -lah hello.exe 
-rwxrwxr-x 1 mariuz mariuz 5.6M Oct  1 18:03 hello.exe

No comments: