How to create a standalone Python app using cython
井民全, Jing, mqjing@gmail.com這裡使用 --embed 參數, 把一個 python 直譯器嵌入進去, 執行 code. 而且 numpy 部份功能沒有實做完成 (ref)
File: hello_world.py
---------------------------------
print("Hello World!")
---------------------------------
Build the standalone
cython -3 --embed hello_world.py
gcc hello_world.c -o hello_world.o -I/usr/include/python3.5 -L/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu -lpython3.5
Run
./hello_world.o
You can also pyinstaller, http://www.pyinstaller.org/ to do the job.