This section provides detailed usage information for the bootstrap.cfg configuration file.
bootstrap.cfg is the configuration file used by the bootstrap.py script to customize it’s behaviour when creating a virtualenv environment for a project. A default bootstrap.cfg is generated, along with the bootstrap.py script, by the mkbootstrap command.
bootstrap.cfg allows one to do the following:
The bootstrap.cfg file is an ASCII text file, similar in format to INI files in that it is separated into sections in the form of [section_name]. Each section, however, can require a different line format and is not necessarily restricted to a set of key=value pairs.
The full default generated bootstrap.cfg text can be read in Appendix B: Default bootstrap.cfg.
Each section of the configuration file is described separately below:
In this section, one can override the default values of the command-line options that bootstrap.py accepts. The accepted options and their default values are listed below.
The format for this section is key = value pairs, one pair per line.
See also
The bootstrap.py script documentation for more information on the specific purpose of each option.
Note
Hyphens (-) in option names on the command-line are replaced with underscores (_) internally. Use underscores in bootstrap.cfg as well.
In this section, one can list any additional Python distributions to install automatically in the virtual environment using pip. These would normally only be the distributions needed for development support, not the dependencies of the project itself (which would go in setup.py).
The format for this section is one distribution per line, each specified either in PEP 314/PEP 345 format using parentheses or in pip-compatible format without parentheses. For example:
pep8 (>=0.5,!=0.5.2,<0.6)
or:
pep8>=0.5,!=0.5.2,<0.6
Note
Not all distributions are compatible with pip. Use the [easy_install] section below for those that are not (or use it for all distributions).
In this section, like in the [pip] section above, one can list any additional Python distributions to install automatically in the virtual environment. However, distribution listed in this section will be installed using easy_install. Similarly, these would normally only be the distributions needed for development support.
The format for this section is the same as that of the [pip] section above.
This section lets one automatically execute additional commands after the virtual environment has been created and all the specified distributions have been installed.
The format for this section is one command (with any arguments) per line.
Note
One can use the $bin$ token to indicate the virtual environment’s bin/ directory, which can have a different name on some platforms (e.g. Scripts\ on Windows). The trailing slash is also included.
For example:
$bin$python setup.py develop