title: Python embedding
body: <p>I would like to have a single big binary which embeds Python interpreter and a small script - I'm totally new to this whole static linking, configure &amp; make and GCC et al. Please, could someone describe to me the basic steps in building such executable?</p>
  
  <p>I'm on MacOS 10.6, I downloaded Python 3.3 beta. Then, I created "test.c":</p>
  
  <pre><code>#include &lt;Python.h&gt;
  
  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;
  }
  </code></pre>
  
  <p>Now, in a folder, I have both "Python-3.3.0b1" folder and "test.c" file.</p>
  
  <p>I typed:</p>
  
  <pre><code>gcc -I ./Python-3.3.0b1 -o test test.c
  </code></pre>
  
  <p>but I got lots of "include" error.</p>
  
  <p>But I'm not even sure if this is the right way to proceed..? Should I first somehow build just Python and then "link" it with "test.c"?</p>
  
  <p>Btw., if Python gets released do they use the same procedure of "./configure" and "make"? Do they use some special options or am I able to build very similar (the same) Python executable as the one provided from python.org?</p>
  
  <p>Also, I tried this "./configure" and "make" and it made a folder called "build/lib.macosx-10.6-x86_64-3.3" with lots of *.so files (?) but there is nothing called "python" or similar...?</p>