title: How to build python without threads and/or how to detect if python was built with threads?
body: <p>I've built the following versions of python:
  2.6, 2.7, 2.7.4, 2.7.5, 2.7.6, 2.7.7, 2.7.8, 2.7.9, 2.7.10</p>
  
  <p>All with the following flags : </p>
  
  <pre><code>--prefix=/home/bdbaddog/tools/python-${x}-nothread --enable-shared --enable-unicode --without-threads
  </code></pre>
  
  <p>The advice I've found elsewhere sugguests that threading should throw and ImportError exeception when</p>
  
  <pre><code>python -mthreading
  </code></pre>
  
  <p>is run.  However for every version listed built as above I get the following output (though the order of the lines varies):</p>
  
  <pre><code>$tools/python-2.7.10-nothread/bin/python -mthreading
  Producer-1.1
  Producer-2.1
  Producer-1.2
  Producer-1.3
  Producer-3.1
  Producer-1.4
  Producer-2.2
  Producer-3.2
  Producer-1.5
  Producer-2.3
  Producer-3.3
  Producer-2.4
  Producer-3.4
  Producer-2.5
  Producer-3.5
  </code></pre>
  
  <p>This would lead me to believe that threading is indeed enabled.
  When I look at the install directories I only see the following notable differences:</p>
  
  <ul>
  <li>Only in tools/python-2.7.10/lib/python2.7/lib-dynload:
  _multiprocessing.so </li>
  <li>tools/python-2.7.10/lib/python2.7/_sysconfigdata.py 
  
  <ul>
  <li>See: <a href="https://gist.github.com/bdbaddog/2bef150ec4fbf016dc60" rel="nofollow">https://gist.github.com/bdbaddog/2bef150ec4fbf016dc60</a></li>
  </ul></li>
  </ul>
  
  <p>More info: python-config for each yields:</p>
  
  <pre><code>$ tools/python-2.7.10/bin/python-config --libs
  -lpython2.7 -lpthread -ldl -lutil -lm
  $ tools/python-2.7.10-nothread/bin/python-config --libs
  -lpython2.7 -ldl -lutil -lm
  </code></pre>
  
  <p>I need to know if threads are enabled or not so my python script can do different things in either case.</p>
  
  <p>Have I not configured it properly to turn off threads?</p>