I would like to have one big binary file in which the Python interpreter and a small script are built-in - I am completely new to this static layout, setup and creation and GCC, etc. Please, can someone describe to me the basic steps in creating such an executable file?
I'm on MacOS 10.6, I downloaded the beta version of Python 3.3. Then I created "test.c":
#include <Python.h>
int
main(int argc, char *argv[])
{
Py_Initialize();
PyRun_SimpleString("from time import time,ctime\n"
"print('Today is', ctime(time()))\n");
Py_Finalize();
return 0;
}
Now in the folder I have the folder "Python-3.3.0b1" and "test.c".
I typed:
gcc -I ./Python-3.3.0b1 -o test test.c
but I got a lot of "include" errors.
But I'm not even sure that this is the right way. Should I first build only Python somehow, and then "link" it to "test.c"?
Btw., Python , "./configure" "make"? ( ) Python, , python.org?
, "./configure" "make" "build/lib.macosx-10.6-x86_64-3.3" .so, "python" ...?