title: What did Apple do to the Python framework?
body: <p><em>[tl;dr? see bottom]</em></p>
  
  <p>Python on OS X has always been somewhat of an abomination in that it's split up and spread out all across the system. Some in <code>/usr</code>, some in <code>/Library/Python</code>, some <code>/System/Library/Frameworks/Python.framework</code>.</p>
  
  <p>Now, as I understand it, the framework is supposed to contain the Python <em>distribution</em>, i.e. the bits and pieces that aren't going to change. An example would be headers, the standard library, the binary images, etc.</p>
  
  <p>So as a developer of a <a href="http://sendapatch.se/projects/pylibmc/" rel="noreferrer">sort-of-popular Python C extension</a>, I think myself to be pretty good at the OS X ecosystem and how to compile Python extensions on it. It wasn't a month ago that <a href="https://github.com/lericson/pylibmc/issues/35" rel="noreferrer">Apple decided to skip on QA</a>, breaking C extension building across the board.</p>
  
  <p>It's broken in yet a new way though, as Apple seem to have decided to remove the better part of the Python distribution. Take a look at the <code>include/</code> directory:</p>
  
  <pre><code>$ ls -l /System/Library/Frameworks/Python.framework/Versions/Current/include/python2.6 
  total 16
  -rw-r--r--  1 root  wheel    30K Jun 25  2010 pyconfig.h
  </code></pre>
  
  <p>Missing something? The <code>Python.h</code> header perhaps? What's more, I had woes with <code>zc.buildout</code> because it couldn't find <code>site.py</code>... Have a look-see:</p>
  
  <pre><code>$ python -c 'print __import__("site").__file__'
  /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.pyc
  
  $ ls -l /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.py*
  -rw-r--r--  1 root  wheel    20K May 17 15:40 /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.pyc
  </code></pre>
  
  <p>Missing something? The <code>site.py</code> original perhaps?</p>
  
  <p>All in all, it seems Apple are stripping out <em>vital</em> developer resources. I confirmed both of these findings on other MacBooks with OS X 10.6.7.</p>
  
  <p><strong>tl;dr</strong> Apple have removed lots of vital headers and source-code from the Python framework. Has this happened anybody else? If so, when did this happen? Why did it happen? And most importantly, how do I get them back?</p>