Q:

How to compile C Extension for Python

I am attempting to install https://github.com/lthiery/SPI-Py (on a Raspberry Pi running Raspbian)
by running sudo python setup.py install
This fails with error
spi.c:20:20: fatal error: Python.h: No such file or directory
 #include <Python.h>

Presumably I need to install some library but the "documentation" with SPI-Py is almost non-existent. 
I have no problem running other c programs. 
There is a /usr/lib/pypy-upstream/include/Python.h

A:

You should install the package python-dev. 

A:

It seems that the C compiler (probably gcc) cannot find Python.h.   You can either edit the source of SPI-Py to point to PyPy's version, or you can install the appropriate python-dev package to perform the SPI-Py install. 
Install python-dev
This is the least intrusive method, but it may be considered "bulky" since you already have PyPy on the system.   If you're using Python 2, get that dev package:
sudo apt-get install python-dev

Or, to install the Python 3 dev package:
sudo apt-get install python3-dev

After you have the appropriate dev package, try to install SPI-Py again.   If it succeeds, you can safely remove the Python dev package, if you wish.   To remove the Python 2 dev package:
sudo apt-get purge python-dev

Or, to remove the Python 3 dev package:
sudo apt-get purge python3-dev

After either command, you can remove their dependencies with:
sudo apt-get autoremove

Modify SPI-Py
Please note that I have not tested this solution.   To force SPI-Py to use PyPy's "Python.h", you'll probably have to edit the spi.c file.   Change the following line:
module1 = Extension('spi', sources = ['spi.c'])

to:
module1 = Extension('spi',
                    include_dirs = ['/usr/lib/pypy-upstream/include/'],
                    sources = ['spi.c'])

After that, try to install SPI-Py again.