title: Python setuptools: install pacakge dependencies from a local repository
body: <p>The dependencies of A Python package are declared in a file called <code>setup.py</code>, under the key <code>
  install_requires</code>, e.g.:</p>
  
  <pre><code>  install_requires=[
        'Flask &gt;= 0.10.1',
        'requests &gt;= 2.2.1',
        'jsonschema &gt;= 2.3.0',
        'nose &gt;= 1.3.0',
        'behave &gt;= 1.2.4'
    ]
  </code></pre>
  
  <p>The dependencies for tests are declared under the key <code>tests_requires</code>.</p>
  
  <p>When the package is installed (by using <code>python setup.py install</code>), the dependencies are fetched from The Python Package index (<a href="https://pypi.python.org/" rel="nofollow">pypi.python.org</a>).</p>
  
  <p><strong>Is there a way to install the package, and let it fetch its dependencies from a local package repository, like <a href="https://pypi.python.org/pypi/pypiserver" rel="nofollow">pypiserver</a>?</strong> </p>
  
  <p>This way I can cache frequently-used packages, and install internal packages that do not exist in PyPi.</p>
  
  <p>I am probably looking for something like:</p>
  
  <pre><code>python setup.py install 
        --repo http://127.0.0.1:8000/localrepo 
        --fallback-repo http://pypi.python.org
  </code></pre>