title: Dependencies (requirements) for setting up, testing, and installing a Python library
body: <p>I'm writing a Python package to be distributed and installed via PyPi.org. There are plenty of examples out there, but I can't get my mind wrapped around the proper usage of the <code>install_requires</code>, <code>setup_requires</code>, and <code>tests_require</code> arguments in the call to <code>setup()</code>.</p>
  
  <p>I know <code>install_requires</code> is the minimum set of dependencies for the library itself. This one is easy.</p>
  
  <ol>
  <li>What is the difference (if there need be any) between <code>setup_requires</code> and <code>tests_require</code>?</li>
  <li>What needs to go into each one if I want unit tests to run in a CI environment? And should unit tests run when the library gets installed?</li>
  <li>When I set up a local virtualenv for developing and testing the library, which set of requires do I want installed?</li>
  </ol>