[TIP] tox offline usage

Alexander Steinert sputnik at termo.net
Mon Jun 20 10:28:34 PDT 2011


Dear list,

I would like to use tox in an environment that has no internet access.
In my trivial example, I specify a dependency in the testenv section:

    [tox]
    envlist = py26
    [testenv]
    deps = pytest==2.0.3
    commands = true

I want tox to install the pytest-2.0.3.zip distribution that exists in
my file system, say ./lib/pytest-2.0.3.zip.

With pip, I can achieve that by using --no-index and --find-links, but I
found no way to tell tox to call pip that way.

Using the indexserver setting would require me to have a PyPI server
running in my network. I'd like to avoid that.

Apart from patching tox' code, is there any other way to achieve my
goal?

While we're at it: When I run tox (configured as above) for the first
time, it fails (as expected) with "could not install deps
[pytest==2.0.3]". When run again, it is happily "reusing existing
matching virtualenv py26" and running /bin/true but silently ignoring
the missing dependency. Should I file a bug report?

Best regards
Stony




More information about the testing-in-python mailing list