Don't install dependencies when performing `setup.py test`
<p>I want to do an offline installation of a python package. As part of the installation, I run the package's tests with <code>python3 setup.py test</code>. When I run the test command, setuptools fetches all of the unsatisfied dependencies from <code>pypi.python.org</code>. However I'm providing all of the package's dependencies and if a dependency isn't satisfied, I want that to be an error -- I don't want setuptools to download dependencies for me. I'm not sure how to disable this behavior, or even how to tell it to use a different server. How can I stop this?</p>

<p>OK, so here's one way to do it. It's possibly not the most elegant and it has some downsides, but it seems to work.</p>

<p>Create (or modify an existing) <code>setup.cfg</code> file with the following lines:</p>

<pre><code>[easy_install]
find_links = file:///dev/null
index_url = file:///dev/null
</code></pre>

<p>This will inform <code>easy_install</code> (which is what is operating under the hood) to not use any external pypi server.</p>

python setuptools