Try using the binary install, and setting
Code:
CALIBRE_DEVELOP_FROM=/path/to/source/code/
This is the recommended way to hack the source code. You can edit the source code you downloaded/in git, and calibre will use that code for everything (well, not for the handful of C++ components).
See:
http://manual.calibre-ebook.com/develop.html