2 new commits in tox: https://bitbucket.org/hpk42/tox/commits/10157852d890/ Changeset: 10157852d890 User: hpk42 Date: 2013-09-04 15:37:24 Summary: fix issue102: change to {toxinidir} when installing packages and dependencies. this allows to use relative path like in "-rrequirements.txt". Affected #: 7 files
diff -r c3ba84e0cc42ff7e2f59c1d481e8994461fd6e47 -r 10157852d89032acc68c6ffadda02bce713b91b8 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -20,6 +20,9 @@ want to support python2.5/pip1.3.1 based test environments you need to install ssl and/or use PIP_INSECURE=1 through ``setenv``. section. +- fix issue102: change to {toxinidir} when installing dependencies. + this allows to use relative path like in "-rrequirements.txt". + 1.6.0 ----------------- diff -r c3ba84e0cc42ff7e2f59c1d481e8994461fd6e47 -r 10157852d89032acc68c6ffadda02bce713b91b8 doc/conf.py --- a/doc/conf.py +++ b/doc/conf.py @@ -48,7 +48,7 @@ # built documents. # # The short X.Y version. -release = version = "1.6.0" +release = version = "1.6.1" # The full version, including alpha/beta/rc tags. # The language for content autogenerated by Sphinx. Refer to documentation diff -r c3ba84e0cc42ff7e2f59c1d481e8994461fd6e47 -r 10157852d89032acc68c6ffadda02bce713b91b8 doc/config.txt --- a/doc/config.txt +++ b/doc/config.txt @@ -124,7 +124,7 @@ test-specific dependencies -.to be installed into the environment prior to project package installation. Each line defines a dependency, which will be - passed to easy_install/pip for processing. A line specify a file, + passed to the installer command for processing. A line specify a file, an URL or a package name. You can additionally specify an :confval:`indexserver` to use for installing this dependency. All derived dependencies (deps required by the dep) will then be @@ -132,6 +132,9 @@ deps = :myindexserver:pkg + (Experimentally introduced in 1.6.1) all installer commands are executed + using the ``{toxinidir}`` as the current working directory. + .. confval:: setenv=MULTI-LINE-LIST .. versionadded:: 0.9 diff -r c3ba84e0cc42ff7e2f59c1d481e8994461fd6e47 -r 10157852d89032acc68c6ffadda02bce713b91b8 doc/example/basic.txt --- a/doc/example/basic.txt +++ b/doc/example/basic.txt @@ -44,7 +44,7 @@ However, you can also create your own test environment names, see some of the examples in :doc:`examples <../examples>`. -whitelisting a non-virtualenv commands +whitelisting non-virtualenv commands ----------------------------------------------- .. versionadded:: 1.5 @@ -64,6 +64,21 @@ .. _multiindex: +depending on requirements.txt +----------------------------------------------- + +.. versionadded:: 1.6.1 + +(experimental) If you have a ``requirements.txt`` file +you can add it to your ``deps`` variable like this:: + + deps = -rrequirements.txt + +All installation commands are executed using ``{toxinidir}}`` +(the directory where ``tox.ini`` resides) as the current +working directory. Therefore, the underlying ``pip`` installation +will assume ``requirements.txt`` to exist at ``{toxinidir}/requirements.txt``. + using a different default PyPI url ----------------------------------------------- diff -r c3ba84e0cc42ff7e2f59c1d481e8994461fd6e47 -r 10157852d89032acc68c6ffadda02bce713b91b8 doc/example/devenv.txt --- a/doc/example/devenv.txt +++ b/doc/example/devenv.txt @@ -57,7 +57,5 @@ envdir = devenv basepython = python2.7 usedevelop = True - deps = - commands = - pip install -r requirements.txt + deps = -rrequirements.txt diff -r c3ba84e0cc42ff7e2f59c1d481e8994461fd6e47 -r 10157852d89032acc68c6ffadda02bce713b91b8 tests/test_venv.py --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -133,7 +133,7 @@ venv.install_deps() assert len(l) == 2 + py25calls args = l[-1].args - assert l[-1].cwd == venv.envconfig.envlogdir + assert l[-1].cwd == venv.envconfig.config.toxinidir assert "pip" in str(args[0]) assert args[1] == "install" #arg = "--download-cache=" + str(venv.envconfig.downloadcache) @@ -163,7 +163,7 @@ venv.install_deps() assert len(l) == 2 + py25calls args = l[-1].args - assert l[-1].cwd == venv.envconfig.envlogdir + assert l[-1].cwd == venv.envconfig.config.toxinidir assert "pip" in str(args[0]) assert args[1] == "install" assert "dep1" in args diff -r c3ba84e0cc42ff7e2f59c1d481e8994461fd6e47 -r 10157852d89032acc68c6ffadda02bce713b91b8 tox/_venv.py --- a/tox/_venv.py +++ b/tox/_venv.py @@ -216,7 +216,7 @@ action.setactivity('pip-downgrade', 'pip<1.4') argv = ["easy_install"] + \ self._installopts(indexserver) + ['pip<1.4'] - self._pcall(argv, cwd=self.envconfig.envlogdir, + self._pcall(argv, cwd=self.envconfig.config.toxinidir, action=action) def finish(self): @@ -299,8 +299,8 @@ env = dict(PYTHONIOENCODING='utf_8') if extraenv is not None: env.update(extraenv) - self._pcall(argv, cwd=self.envconfig.envlogdir, - extraenv=env, action=action) + self._pcall(argv, cwd=self.envconfig.config.toxinidir, + extraenv=env, action=action) def _install(self, deps, extraopts=None, action=None): if not deps: https://bitbucket.org/hpk42/tox/commits/2e580ee6feea/ Changeset: 2e580ee6feea User: hpk42 Date: 2013-09-04 15:55:01 Summary: pass PIP_INSECURE as env var in py25 environment Affected #: 1 file diff -r 10157852d89032acc68c6ffadda02bce713b91b8 -r 2e580ee6feea934cc2e683635abded27c0de0be9 tox.ini --- a/tox.ini +++ b/tox.ini @@ -18,6 +18,9 @@ --junitxml={envlogdir}/junit-{envname}.xml \ check_sphinx.py {posargs} +[testenv:py25] +setenv= PIP_INSECURE=1 + [pytest] rsyncdirs=tests tox Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. _______________________________________________ pytest-commit mailing list pytest-commit@python.org https://mail.python.org/mailman/listinfo/pytest-commit