Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
The Python action in Continua is a wrapper around the python.exe command line. If you're having trouble using the Python action, please refer to the Command Line Reference.

Python action is used to run python scripts, modules or commands.

...

The working directory for the pip python command line. Leave blank to default to the workspace folder.

...

What To

...

The name of the Python package, the URL of the VCS project, a local project directory, or the path/URL of a local/remote package archive to build the wheel for. Leave blank or '.' to search in working folder.

Note that if installing a VCS project in editable mode it must be in the form: vcs+protocol://repo_url/#egg=pkg&subdirectory=pkg_dir. (e.g git+http://git.example.com/MyProject#egg=MyProject). For more information please see Pip Install VCS Support .

Install the project in editable mode

If this is ticked, the project is installed in editable mode.

Requirements File(s)

Install packages from the given requirements files. One file path per line. [--requirement]

Output Directory

Visible only if the checkbox 'Install the project in editable mode' is NOT ticked.

Path to the directory where the wheel will be built. Defaults to the working folder. [--wheel]

Source Directory

Visible only if the checkbox 'Install the project in editable mode' is ticked.

Run

Select what to run. The relevant fields are located in their respective tabs.

  • Script
  • Module
  • Command

Command Line Version

Select the version of the Python command line that is installed on the agent. Some other settings and options may be unavailable depending which the command line version is selected.The directory to check out editable projects into. The default when running under a virtual environment is “<venv path>\src”. The default for global installs is “<current dir>\src”. [--src]

Use command line executable in virtual environment scripts folder if it exists.

If this is ticked and exists, the pip python executable in the virtual environment scripts folder will be used instead.

...

If you create a property collector for this action, make sure you select the Path Finder PlugIn type and give it a name that will match the pattern above in blue. Example names listed here, search the table's Plugin column for "PipPython".

For more in-depth explanations on property collectors see Property Collectors.

Alternatively, you can select the Custom option from the Using drop down list and specify a path in the resulting input field that will be displayed. Please read Why it's a good idea to use a property collector before using this option.


Script

Module

Image Removed

Commands

Image Removed

Settings

Image Removed

Non-Binary Packages

Specify any packages for which binary packages should not be used. [--no-binary]

  • All - Disable all binary packages.
  • None - Empty the set of binary packages to be disabled.
  • Custom List - The custom set of binary packages to be disabled.

Note that some packages are tricky to compile and may fail to install when this option is used on them.

Non-Binary Package Names

Visible only if the option 'Custom List' is selected.

The names of the non-binary packages. One per line.

Binary Only Packages

Specify any packages for which only binary packages should not be used. [--only-binary]

  • All - Disable all source packages.
  • None - Empty the set of source packages to be disabled.
  • Custom List - The custom set of source packages to be disabled.

Note that packages without binary distributions will fail to install when this option is used on them.

Binary Only Package Names

Visible only if the option 'Custom List' is selected.

The names of the non-binary packages. One per line.

Constraints File(s)

Constrain versions using the given constraints files. One file path per line. [--constraint]

Prefer older binary packages over newer source packages.

If this is ticked, older binary packages will be used instead of newer source packages. [--prefer-binary]

Connection

Image Removed

Proxy

Specify a proxy in the form [user:passwd@]proxy.server:port. It is recommended to use a password type variable to store the password. [--proxy]

Trusted Host

Mark this host as trusted even if it does not have valid or any HTTPS. [--trusted-host]

CA Certificate

The path to the alternate CA bundle. [--cert]

Client Certificate

The path to the SSL client certificate. A single file containing the private key and the certificate in PEM format. [--client-cert]

Timeout

Set the socket timeout in seconds. Leave zero to default to 15 seconds. [--timeout]

Retires

Maximum number of retries each connection should attempt. Leave zero to default to 5 times. [--retries]

Installation

Image Removed

Build

Directory to unpack packages into and build in. [--build]

Source Distribution

Select whether to use PEP 517 for building source distributions or force legacy behaviour. [--use-pep517 | --no-use-pep517]

Don't install package dependencies.

If this is ticked, package dependencies are not installed. [--no-deps]

Disable isolation when building a modern source distribution. 

If this is ticked, isolation is disabled when building a modern source distribution. [--no-build-isolation]

Don't clean up build directories.

If this is ticked, build directories are not cleaned. [--no-clean]

Ignore the Requires-Python information.

If this ticked, the Requires-Python information is ignored. [--ignore-requires-python]

Require a hash to check against each requirement for repeatable installs. This is implied when any package in a requirements file has a --hash option. 

If this is ticked, a hash is required to check against each requirement for repeatable installs. This is implied when any package in a requirements file has a --hash option.  [--require-hashes]

Include pre-release and development versions. By default, pip only finds stable versions.

If this is ticked, pip will also find pre-release and development versions. By default, pip only finds stable versions. [--pre]

Package Index

Image Removed

No Index

If this is ticked, the package index is ignored. Only look at find links URLs instead.

Index URL

Visible only if the checkbox 'No Index' is NOT ticked.

The base URL of Python Package Index. Default is https://pypi.org/simple. This should point to a repository compliant with PEP 503 (the simple repository API) or a local directory laid out in the same format. [--index-url]

Extra Index URL

Visible only if the checkbox 'No Index' is NOT ticked.

The extra URLs of package indexes to use in addition to --index-url. Should follow the same rules as --index-url. [--extra-index-url]

Visible only if the checkbox 'No Index' is ticked.

If a URL or path to a HTML file is specified, then it is parsed for links to archives. If a local path or file:// URL that’s a directory is specified, then the directory listing will be searched for archives. [--find-links]

Extra Arguments

Image Removed

Global Options

Script

Path to a python script file, a directory containing a __main__.py file, or a zipfile containing a __main__.py file to run.

Arguments

List of arguments to be passed to the script. One per line.


Module

Image Added

Module

The name of the module or package to run. [-m]

Arguments

List of arguments to be passed to the module. One per line.


Commands

Image Added

Commands

Python code to be executed in command. One statement per line or separated by a ';' with significant leading white space as in normal module code. It is suggested that this method is used only when running simple commands. [-c]

Arguments

List of arguments to be passed to the command. One per line.


Settings

Image Added

Run Python in isolated mode.

If this is ticked, Python is run in isolated mode. [-I]

Ignore all PYTHON* environment variables.

Visible only if the checkbox 'Run Python in isolated mode' is NOT ticked.

If this is ticked, all PYTHON* environment variables are ignored. This is implied if python is run in isolated mode. [-E]

Don't add the user site-packages directory to sys.path.

Visible only if the checkbox 'Run Python in isolated mode' is NOT ticked.

If this is ticked, the user site-packages directory is not added to the sys.path. This is implied if python is run in isolated mode. [-s]

Division Control Semantics

Control the semantics of division. [-Q]

  • old - division of int/int and long/long return an int or long (default)
  • new - new division semantics, i.e. division of int/int and long/long returns a float
  • warn - old division semantics with a warning for int/int and long/long
  • warnall - old division semantics with a warning for all uses of the division operator

Note that this option is only available in Python version 2.x.

Validation of Hash-Based .pyc Files

Control the validation behavior of hash-based .pyc files. [----check-hash-based-pycs]

  • Default - checked and unchecked hash-based bytecode cache files will be validated according to their default semantics.
  • Always - all hash-based .pyc files, whether checked or unchecked, will be validated against their corresponding source file.
  • Never - hash-based .pyc files will be validated against their corresponding source files.

Code Optimisation

Select the level of code optimisation.

  • No code optimisation
  • Remove assert statements and any code conditional on the value of __debug__ [-O]
  • Remove assert statements, any code conditional on the value of __debug__ and docstrings [-OO]

Don't try to write .pyc files on the import of source modules.

If this is ticked, Python won’t try to write .pyc files on the import of source modules. [-B]

Turn on hash randomisation.

If this is ticked, hash randomisation is turned on. [-R]

Note that this option only has an effect if the PYTHONHASHSEED environment variable is set to 0, since hash randomisation is enabled by default.

Disable the import of the module site and the site-dependent manipulations of the sys.path that it entails.

If this is ticked, the import of the module site and the site-dependent manipulations of sys.path that it entails is disabled. Also, the manipulations are disabled if site is explicitly imported later. [-S]

Force the stdout and stderr streams to be unbuffered.

If this is ticked, the stdout and stderr streams are forced to be unbuffered. [-u]

Skip the first line of the source.

If this is ticked, the first line of the source is skipped. This allows the use of non-Unix forms of #!cmd. This is intended for a DOS specific hack only. [-x]

Note that, with this option ticked, line numbers in error messages will be off by one.

Implementation Specific Options

Enter any implementation-specific options. These can be predefined or arbitrary values. One per line. [-XExtra global options to be supplied to the setup.py call before the install command. One per line. [--global-option]


Options

Verbosity

The amount of information detail to display in the build log. [-qqq | -qq | -q | -v]

Log File

The path to a verbose appending log file. [--log]

Disable the cache.

If this is ticked, the cache is disabled. [--no-cache-dir]

Cache Directory

The path to a directory to store the cache data. [--cache-dir]

Run pip in an isolated mode, ignoring environment variables and user configuration.

If this ticked, pip is run in an isolated mode, ignoring environment variables and user configuration. [--isolated]

Exists Action

Specify what to do if path already exists. [--exists-action]

...

v | -vv]

Byte / Literals Comparison

Whether to issue a warning or error when comparing bytes or bytearray with str or bytes with int. [-b | -bb]

Indentation Issues

Select whether to issue a warning or error when a source file mixes tabs and spaces for indentation in a way that makes it depend on the worth of a tab expressed in spaces. [-t | -tt]

Note that this option is only available in Python version 2.x

Warning Control

This option controls how often warnings are output to stderr. Leave blank to default to one warning for each source line where it occurs. [-W]

Multiple options may be given; when a warning matches more than one option, the action for the last matching option is performed. Invalid options are ignored (though, a warning message is printed about invalid options when the first warning is issued).

The simplest form of argument is one of the following action strings:

  • ignore - Ignore all warnings
  • default - Explicitly request the default behaviour (printing each warning once per source line)
  • all - Print a warning each time it occurs (this may generate many messages if a warning is triggered repeatedly for the same source line, such as inside a loop)
  • module - Print each warning only the first time it occurs in each module
  • once - Print each warning only the first time it occurs in the program.
  • error - Raise an exception instead of printing a warning message.

The full form of argument is: action:message:category:module:line

For more information, please refer to the warnings module in the python documentation.

Warn about Python 3.x possible incompatibilities

If this is ticked, a 'DeprecationWarning' is emitted for features that are removed or significantly changed in Python 3 and can’t be detected using static code analysis. [-3]

Note that this option is only available in Python versions 2.6 and 2.7

...

.

Timeout (in seconds) 

How many seconds to wait for the action to finish before timing out. The default is 86400 seconds (24 hours).

...

If this is ticked, any warnings logged will not mark the action with a warning status. [-W]


Environment

Environment Variables

...