diff options
author | Julian Krause <julian.krause@gmail.com> | 2015-01-22 14:52:53 -0800 |
---|---|---|
committer | Julian Krause <julian.krause@gmail.com> | 2015-01-22 14:52:53 -0800 |
commit | 18eaae9e54363465631b5c8bab1aa702998939f5 (patch) | |
tree | 683bafb5f7975a9caf4759b49303d012a6860592 | |
parent | ac65fa83ff498ab5ee02a3cc73deef3c30619a00 (diff) | |
download | tox-18eaae9e54363465631b5c8bab1aa702998939f5.tar.gz |
Fix issue11: Add a skip_install option on a per-environment level.
-rw-r--r-- | doc/config.txt | 10 | ||||
-rw-r--r-- | tox/_cmdline.py | 2 | ||||
-rw-r--r-- | tox/_config.py | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/doc/config.txt b/doc/config.txt index 6ffd02b..a29c5fd 100644 --- a/doc/config.txt +++ b/doc/config.txt @@ -252,6 +252,16 @@ Complete list of settings that you can put into ``testenv*`` sections: **default**: ``False`` +.. confval:: skip_install=BOOL + + .. versionadded:: 1.9 + + Do not install the current package. This can be used when you need the + virtualenv management but do not want to install the current package + into that environment. + + **default**: ``False`` + Substitutions ------------- diff --git a/tox/_cmdline.py b/tox/_cmdline.py index 0df2f17..bab803e 100644 --- a/tox/_cmdline.py +++ b/tox/_cmdline.py @@ -448,7 +448,7 @@ class Session: if self.setupenv(venv): if venv.envconfig.develop: self.developpkg(venv, self.config.setupdir) - elif self.config.skipsdist: + elif self.config.skipsdist or venv.envconfig.skip_install: self.finishvenv(venv) else: self.installpkg(venv, sdist_path) diff --git a/tox/_config.py b/tox/_config.py index 41f02ec..5f89ec4 100644 --- a/tox/_config.py +++ b/tox/_config.py @@ -395,6 +395,8 @@ class parseini: vc.pip_pre = config.option.pre or reader.getbool( section, "pip_pre", False) + vc.skip_install = reader.getbool(section, "skip_install", False) + return vc def _getenvdata(self, reader, toxsection): |