`skip_install=true` in fails on building sdist

Issue #261 on hold
Jan Vlčinský created an issue

Issue #11 was resolved by adding skip_install into [testenv] section.

Having following tox.ini:


dep = boto

I have expected, there will be two virtualenvs py27 and py34 created without trying to install from setup.py as I have none in my project.

However, it fails at the attempt to build sdist.

$ tox
Traceback (most recent call last):
  File "/usr/bin/tox", line 11, in <module>
  File "/home/javl/.virtualenvs/bin-tox/local/lib/python2.7/site-packages/tox/session.py", line 39, in main
    retcode = Session(config).runcommand()
  File "/home/javl/.virtualenvs/bin-tox/local/lib/python2.7/site-packages/tox/session.py", line 373, in runcommand
    return self.subcommand_test()
  File "/home/javl/.virtualenvs/bin-tox/local/lib/python2.7/site-packages/tox/session.py", line 518, in subcommand_test
    path = self.get_installpkg_path()
  File "/home/javl/.virtualenvs/bin-tox/local/lib/python2.7/site-packages/tox/session.py", line 494, in get_installpkg_path
    path = self._makesdist()
  File "/home/javl/.virtualenvs/bin-tox/local/lib/python2.7/site-packages/tox/session.py", line 388, in _makesdist
    raise tox.exception.MissingFile(setup)
tox.MissingFile: MissingFile: /home/javl/.tox/nosetup/setup.py

I know, this could be resolved by adding skipsdist=true into [tox] section, but I would assume, that skip_install=true means, there shall be also no attempt to create sdist package.

$ python --version
Python 2.7.9

$ tox --version
2.1.1 imported from /home/javl/.virtualenvs/bin-tox/local/lib/python2.7/site-packages/tox/__init__.pyc

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.1 (jessie)
Release:        8.1
Codename:       jessie

Comments (3)

  1. jmbowman

    In this case I think skipsdist=true is actually what you want. One tox run can execute multiple test environments, so the sdist is only generated once as an optimization. If any of the environments need the sdist, it has to be built. If none of them need it, you can skip that step via skipsdist. For any environment that doesn't need the package to be installed, you can avoid installing the already-generated sdist (and its dependencies) via skip_install=true in the environment configuration.

    This seems to be working as intended, although the documentation could benefit from a section explaining in more detail how the various installation-related configuration options interact.

  2. Log in to comment