Best practice for hacking on a 3rd-party python module
<p>I often find myself wanting to use a 3rd party python module in my own project, but I know that I will also need to make changes to the 3rd party module that I want to push upstream. What is the best practice of file layout/installation to achieve this?</p>

<p>Most python modules are laid out with root dir containing a "setup.py" to compile/install the module. The problem is, every time I make changes to the module source I need to re-run the full install step in order to use those changes in my project. For large modules, like scipy this can take some time.</p>

<p>Alternatively, I can hack on the installed version of the python module, but then I have to manually move those changes back to the source version of the module in order to generate patches etc.</p>

<p>I know about virtualenv and PYTHONPATH but they are ways of installing a module to a different location.</p>

<p>So far, I have manually created symlinks, but that is messy.</p>
