Don't install from source. Instead run from source. To do this, install the calibre binary from the calibre site, get the calibre source from GitHub, set the env variable, then put your modified .py file in the source tree. This process is easy and avoids the distro release entirely.
How to do all of this is described
in the calibre FAQ.