5 new commits in tox: https://bitbucket.org/hpk42/tox/commits/3744404876e8/ Changeset: 3744404876e8 Branch: jurko/documentation-fixes User: jurko Date: 2014-03-23 14:11:12 Summary: fix documentation typo Affected #: 1 file
diff -r b0360a54ab368ef428c7f83601ba6b64f6fec64f -r 3744404876e8428ce8b446ae5227d2b179ca8f7a doc/example/devenv.txt --- a/doc/example/devenv.txt +++ b/doc/example/devenv.txt @@ -47,7 +47,7 @@ Let's say we want our development environment sit at ``devenv`` and pull packages from ``requirements.txt`` file which we create at the same directory -as ``tox.ini`` file. We also want to speciy Python version to be 2.7, and use +as ``tox.ini`` file. We also want to specify Python version to be 2.7, and use ``setup.py develop`` to work in development mode instead of building and installing an ``sdist`` package. https://bitbucket.org/hpk42/tox/commits/73cc0721f3c4/ Changeset: 73cc0721f3c4 Branch: jurko/documentation-fixes User: jurko Date: 2014-03-23 14:48:08 Summary: stylistic documentation wording cleanup Affected #: 1 file diff -r 3744404876e8428ce8b446ae5227d2b179ca8f7a -r 73cc0721f3c46c81bd6e0e71b9022ced4d8ba8cc doc/example/devenv.txt --- a/doc/example/devenv.txt +++ b/doc/example/devenv.txt @@ -1,61 +1,78 @@ - +======================= Development environment ======================= -Tox can be used to prepare development virtual environment for local projects. -This feature can be useful in order to preserve environment across team members -working on same project. It can be also used by deployment tools to prepare -proper environments. +Tox can be used for just preparing different virtual environments required by a +project. +This feature can be used by deployment tools when preparing deployed project +environments. It can also be used for setting up normalized project development +environments and thus help reduce the risk of different team members using +mismatched development environments. -Configuration -------------- +Here are some examples illustrating how to set up a project's development +environment using tox. For illustration purposes, let us call the development +environment ``devenv``. -Firstly, you need to prepare configuration for your development environment. In -order to do that, we must define proper section at ``tox.ini`` file and tell at -what directory environment should be created. Moreover, we need to specify -python version that should be picked, and that the package should be installed -with ``setup.py develop``:: + +Example 1: Basic scenario +========================= + +Step 1 - Configure the development environment +---------------------------------------------- + +First, we prepare the tox configuration for our development environment by +defining a ``[testenv:devenv]`` section in the project's ``tox.ini`` +configuration file:: [testenv:devenv] envdir = devenv basepython = python2.7 usedevelop = True + +In it we state: + +- what directory to locate the environment in, +- what Python executable to use in the environment, +- that our project should be installed into the environment using ``setup.py + develop``, as opposed to building and installing its source distribution using + ``setup.py install``. + +Actually, we can configure a lot more, and these are only the required settings. +For example, we can add the following to our configuration, telling tox not to +reuse ``commands`` or ``deps`` settings from the base ``[testenv]`` +configuration:: + commands = deps = -Actually, you can configure a lot more, those are the only required settings. -In example you can add ``deps`` and ``commands`` settings. Here, we tell tox -not to pick ``commands`` or ``deps`` from base ``testenv`` configuration. +Step 2 - Create the development environment +------------------------------------------- - -Creating development environment --------------------------------- - -Once ``devenv`` section is defined we can instrument tox to create our -environment:: +Once the ``[testenv:devenv]`` configuration section has been defined, we create +the actual development environment by running the following:: tox -e devenv -This will create an environment at path specified by ``envdir`` under -``[testenv:devenv]`` section. +This creates the environment at the path specified by the environment's +``envdir`` configuration value. -Full configuration example --------------------------- +Example 2: A more complex scenario +================================== -Let's say we want our development environment sit at ``devenv`` and pull -packages from ``requirements.txt`` file which we create at the same directory -as ``tox.ini`` file. We also want to specify Python version to be 2.7, and use -``setup.py develop`` to work in development mode instead of building and -installing an ``sdist`` package. +Let us say we want our project development environment to: -Here is example configuration for that:: +- be located in the ``devenv`` directory, +- use Python executable ``python2.7``, +- pull packages from ``requirements.txt``, located in the same directory as + ``tox.ini``. + +Here is an example configuration for the described scenario:: [testenv:devenv] envdir = devenv basepython = python2.7 usedevelop = True deps = -rrequirements.txt - https://bitbucket.org/hpk42/tox/commits/26aaf55693f5/ Changeset: 26aaf55693f5 Branch: jurko/documentation-fixes User: jurko Date: 2014-03-23 16:28:36 Summary: fix documentation typo Affected #: 1 file diff -r 73cc0721f3c46c81bd6e0e71b9022ced4d8ba8cc -r 26aaf55693f51dfb11d5caa593c1daa843eaac3a doc/config.txt --- a/doc/config.txt +++ b/doc/config.txt @@ -202,7 +202,7 @@ .. versionadded:: 0.9 Multi-line ``name = URL`` definitions of python package servers. - Depedencies can specify using a specified index server through the + Dependencies can specify using a specified index server through the ``:indexservername:depname`` pattern. The ``default`` indexserver definition determines where unscoped dependencies and the sdist install installs from. Example:: https://bitbucket.org/hpk42/tox/commits/96ecf1f27a21/ Changeset: 96ecf1f27a21 Branch: jurko/documentation-fixes User: jurko Date: 2014-03-23 16:29:11 Summary: trim trailing spaces in doc/config.txt Affected #: 1 file diff -r 26aaf55693f51dfb11d5caa593c1daa843eaac3a -r 96ecf1f27a218fa85a9daf7641a132ee9c8f9c31 doc/config.txt --- a/doc/config.txt +++ b/doc/config.txt @@ -80,7 +80,7 @@ .. versionadded:: 1.6 - **WARNING**: This setting is **EXPERIMENTAL** so use with care + **WARNING**: This setting is **EXPERIMENTAL** so use with care and be ready to adapt your tox.ini's with post-1.6 tox releases. the ``install_command`` setting is used for installing packages into @@ -94,12 +94,12 @@ if you have configured it. **default**:: - + pip install --pre {opts} {packages} - + **default on environments using python2.5**:: - pip install {opts} {packages}`` + pip install {opts} {packages}`` this will use pip<1.4 which has no ``--pre`` option. Note also that for python2.5 support you may need to install ssl and/or @@ -109,7 +109,7 @@ each line specifies a command name (in glob-style pattern format) which can be used in the ``commands`` section without triggering - a "not installed in virtualenv" warning. Example: if you use the + a "not installed in virtualenv" warning. Example: if you use the unix ``make`` for running tests you can list ``whitelist_externals=make`` or ``whitelist_externals=/usr/bin/make`` if you want more precision. If you don't want tox to issue a warning in any case, just use @@ -136,7 +136,7 @@ using the ``{toxinidir}`` as the current working directory. .. confval:: setenv=MULTI-LINE-LIST - + .. versionadded:: 0.9 each line contains a NAME=VALUE environment variable setting which @@ -164,17 +164,17 @@ **DEPRECATED** -- as of August 2013 you should use setuptools which has merged most of distribute_ 's changes. Just use - the default, Luke! In future versions of tox this option might - be ignored and setuptools always chosen. + the default, Luke! In future versions of tox this option might + be ignored and setuptools always chosen. **default:** False. .. confval:: sitepackages=True|False Set to ``True`` if you want to create virtual environments that also - have access to globally installed packages. + have access to globally installed packages. - **default:** False, meaning that virtualenvs will be + **default:** False, meaning that virtualenvs will be created without inheriting the global site packages. .. confval:: args_are_paths=BOOL @@ -182,7 +182,7 @@ treat positional arguments passed to ``tox`` as file system paths and - if they exist on the filesystem - rewrite them according to the ``changedir``. - **default**: True (due to the exists-on-filesystem check it's + **default**: True (due to the exists-on-filesystem check it's usually safe to try rewriting). .. confval:: envtmpdir=path @@ -347,7 +347,7 @@ pytest mock pytest-xdist - + [testenv:dulwich] deps = dulwich https://bitbucket.org/hpk42/tox/commits/7cbeabe44493/ Changeset: 7cbeabe44493 User: hpk42 Date: 2014-03-24 13:21:27 Summary: Merged in jurko/tox/jurko/documentation-fixes (pull request #87) doc/example/devenv.txt documentation update Affected #: 2 files diff -r b0360a54ab368ef428c7f83601ba6b64f6fec64f -r 7cbeabe4449346ec7273bd3aa760a278ad3c941c doc/config.txt --- a/doc/config.txt +++ b/doc/config.txt @@ -80,7 +80,7 @@ .. versionadded:: 1.6 - **WARNING**: This setting is **EXPERIMENTAL** so use with care + **WARNING**: This setting is **EXPERIMENTAL** so use with care and be ready to adapt your tox.ini's with post-1.6 tox releases. the ``install_command`` setting is used for installing packages into @@ -94,12 +94,12 @@ if you have configured it. **default**:: - + pip install --pre {opts} {packages} - + **default on environments using python2.5**:: - pip install {opts} {packages}`` + pip install {opts} {packages}`` this will use pip<1.4 which has no ``--pre`` option. Note also that for python2.5 support you may need to install ssl and/or @@ -109,7 +109,7 @@ each line specifies a command name (in glob-style pattern format) which can be used in the ``commands`` section without triggering - a "not installed in virtualenv" warning. Example: if you use the + a "not installed in virtualenv" warning. Example: if you use the unix ``make`` for running tests you can list ``whitelist_externals=make`` or ``whitelist_externals=/usr/bin/make`` if you want more precision. If you don't want tox to issue a warning in any case, just use @@ -136,7 +136,7 @@ using the ``{toxinidir}`` as the current working directory. .. confval:: setenv=MULTI-LINE-LIST - + .. versionadded:: 0.9 each line contains a NAME=VALUE environment variable setting which @@ -164,17 +164,17 @@ **DEPRECATED** -- as of August 2013 you should use setuptools which has merged most of distribute_ 's changes. Just use - the default, Luke! In future versions of tox this option might - be ignored and setuptools always chosen. + the default, Luke! In future versions of tox this option might + be ignored and setuptools always chosen. **default:** False. .. confval:: sitepackages=True|False Set to ``True`` if you want to create virtual environments that also - have access to globally installed packages. + have access to globally installed packages. - **default:** False, meaning that virtualenvs will be + **default:** False, meaning that virtualenvs will be created without inheriting the global site packages. .. confval:: args_are_paths=BOOL @@ -182,7 +182,7 @@ treat positional arguments passed to ``tox`` as file system paths and - if they exist on the filesystem - rewrite them according to the ``changedir``. - **default**: True (due to the exists-on-filesystem check it's + **default**: True (due to the exists-on-filesystem check it's usually safe to try rewriting). .. confval:: envtmpdir=path @@ -202,7 +202,7 @@ .. versionadded:: 0.9 Multi-line ``name = URL`` definitions of python package servers. - Depedencies can specify using a specified index server through the + Dependencies can specify using a specified index server through the ``:indexservername:depname`` pattern. The ``default`` indexserver definition determines where unscoped dependencies and the sdist install installs from. Example:: @@ -347,7 +347,7 @@ pytest mock pytest-xdist - + [testenv:dulwich] deps = dulwich diff -r b0360a54ab368ef428c7f83601ba6b64f6fec64f -r 7cbeabe4449346ec7273bd3aa760a278ad3c941c doc/example/devenv.txt --- a/doc/example/devenv.txt +++ b/doc/example/devenv.txt @@ -1,61 +1,78 @@ - +======================= Development environment ======================= -Tox can be used to prepare development virtual environment for local projects. -This feature can be useful in order to preserve environment across team members -working on same project. It can be also used by deployment tools to prepare -proper environments. +Tox can be used for just preparing different virtual environments required by a +project. +This feature can be used by deployment tools when preparing deployed project +environments. It can also be used for setting up normalized project development +environments and thus help reduce the risk of different team members using +mismatched development environments. -Configuration -------------- +Here are some examples illustrating how to set up a project's development +environment using tox. For illustration purposes, let us call the development +environment ``devenv``. -Firstly, you need to prepare configuration for your development environment. In -order to do that, we must define proper section at ``tox.ini`` file and tell at -what directory environment should be created. Moreover, we need to specify -python version that should be picked, and that the package should be installed -with ``setup.py develop``:: + +Example 1: Basic scenario +========================= + +Step 1 - Configure the development environment +---------------------------------------------- + +First, we prepare the tox configuration for our development environment by +defining a ``[testenv:devenv]`` section in the project's ``tox.ini`` +configuration file:: [testenv:devenv] envdir = devenv basepython = python2.7 usedevelop = True + +In it we state: + +- what directory to locate the environment in, +- what Python executable to use in the environment, +- that our project should be installed into the environment using ``setup.py + develop``, as opposed to building and installing its source distribution using + ``setup.py install``. + +Actually, we can configure a lot more, and these are only the required settings. +For example, we can add the following to our configuration, telling tox not to +reuse ``commands`` or ``deps`` settings from the base ``[testenv]`` +configuration:: + commands = deps = -Actually, you can configure a lot more, those are the only required settings. -In example you can add ``deps`` and ``commands`` settings. Here, we tell tox -not to pick ``commands`` or ``deps`` from base ``testenv`` configuration. +Step 2 - Create the development environment +------------------------------------------- - -Creating development environment --------------------------------- - -Once ``devenv`` section is defined we can instrument tox to create our -environment:: +Once the ``[testenv:devenv]`` configuration section has been defined, we create +the actual development environment by running the following:: tox -e devenv -This will create an environment at path specified by ``envdir`` under -``[testenv:devenv]`` section. +This creates the environment at the path specified by the environment's +``envdir`` configuration value. -Full configuration example --------------------------- +Example 2: A more complex scenario +================================== -Let's say we want our development environment sit at ``devenv`` and pull -packages from ``requirements.txt`` file which we create at the same directory -as ``tox.ini`` file. We also want to speciy Python version to be 2.7, and use -``setup.py develop`` to work in development mode instead of building and -installing an ``sdist`` package. +Let us say we want our project development environment to: -Here is example configuration for that:: +- be located in the ``devenv`` directory, +- use Python executable ``python2.7``, +- pull packages from ``requirements.txt``, located in the same directory as + ``tox.ini``. + +Here is an example configuration for the described scenario:: [testenv:devenv] envdir = devenv basepython = python2.7 usedevelop = True deps = -rrequirements.txt - 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