Yara needs the following tools to build
The latest XCode installations do not carry these packages anymore. You will have to install them by hand. On Linux, you should be able to install these using the package managers
Download latest versions from the above links, decompress, build and install them
tar xvf automake.tar.gz
cd automake
./configure && make
sudo make install
Once you have libyara built, building yara-python should be straightforward
python setup.py build
sudo python setup.py install