py_runtimerule.A Python runtime describes either a platform runtime or an in-build runtime. A platform runtime accesses a system-installed interpreter at a known path, whereas an in-build runtime points to a File that acts as the interpreter. In both cases, an "interpreter" is really any executable binary or wrapper script that is capable of running a Python script passed on the command line, following the same conventions as the standard CPython interpreter.
Members
- PyRuntimeInfo
- bootstrap_template
- coverage_files
- coverage_tool
- files
- interpreter
- interpreter_path
- python_version
- stub_shebang
PyRuntimeInfo
PyRuntimeInfo PyRuntimeInfo(interpreter_path=None, interpreter=None, files=None, coverage_tool=None, coverage_files=None, python_version, stub_shebang=None, bootstrap_template=None)
PyRuntimeInfo constructor.
          
      Parameters
| Parameter | Description | 
|---|---|
| interpreter_path | string; or None;
                                     default isNoneThe value for the new object's interpreter_pathfield. Do not give a value for this argument if you pass ininterpreter. | 
| interpreter | File; or None;
                                     default isNoneThe value for the new object's interpreterfield. Do not give a value for this argument if you pass ininterpreter_path. | 
| files | depset of Files; or None;
                                     default isNoneThe value for the new object's filesfield. Do not give a value for this argument if you pass ininterpreter_path. Ifinterpreteris given and this argument isNone,filesbecomes an emptydepsetinstead. | 
| coverage_tool | File; or None;
                                     default isNoneThe value for the new object's coverage_toolfield. | 
| coverage_files | depset of Files; or None;
                                     default isNoneThe value for the new object's coverage_filesfield. Do not give a value for this argument if you do not also pass incoverage_tool. | 
| python_version | required The value for the new object's python_versionfield. | 
| stub_shebang | string;
                                     default is NoneThe value for the new object's stub_shebangfield. If None or not specified,#!/usr/bin/env python3is used. | 
| bootstrap_template | File; or None;
                                     default isNone | 
bootstrap_template
File PyRuntimeInfo.bootstrap_template
coverage_files
depset PyRuntimeInfo.coverage_files
coverage_tool. Will be None if no coverage_tool was provided.
         May return None.
        coverage_tool
File PyRuntimeInfo.coverage_tool
File representing tool used for collecting code coverage information from python tests. Otherwise, this is None.
         May return None.
        files
depset PyRuntimeInfo.files
depset of Files that need to be added to the runfiles of an executable target that uses this runtime (in particular, files needed by interpreter). The value of interpreter need not be included in this field. If this is a platform runtime then this field is None.
         May return None.
        interpreter
File PyRuntimeInfo.interpreter
File representing the interpreter. Otherwise, this is None. Note that an in-build runtime can use either a prebuilt, checked-in interpreter or an interpreter built from source.
         May return None.
        interpreter_path
string PyRuntimeInfo.interpreter_path
None.
         May return None.
        python_version
string PyRuntimeInfo.python_version
"PY2" and "PY3".
        stub_shebang
string PyRuntimeInfo.stub_shebang
py_binary targets.  Does not apply to Windows.