PyInfo

回報問題 查看來源

封裝 Python 規則提供的資訊。

成員

PyInfo

PyInfo PyInfo(transitive_sources, uses_shared_libraries=False, imports=unbound, has_py2_only_sources=False, has_py3_only_sources=False)

PyInfo 建構函式。

參數

參數 說明
transitive_sources Filedepset;必要
新物件 transitive_sources 欄位的值。
uses_shared_libraries 預設值為 False
新物件的 uses_shared_libraries 欄位值。
imports stringdepset;預設值為 unbound
新物件的 imports 欄位值。
has_py2_only_sources 預設值為 False
新物件的 has_py2_only_sources 欄位值。
has_py3_only_sources 預設值為 False
新物件的 has_py3_only_sources 欄位值。

has_py2_only_sources

bool PyInfo.has_py2_only_sources

這個目標中任何遞移來源是否需要 Python 2 執行階段。

has_py3_only_sources

bool PyInfo.has_py3_only_sources

這個目標的任何遞移來源是否需要 Python 3 執行階段。

imports

depset PyInfo.imports

要新增至可執行 Python 目標 PYTHONPATH 的匯入路徑字串解壓縮區。這些是從遞移 deps 累積的。

我們無法保證解碼器的順序,日後可能會有所變動。建議使用 default 順序 (預設)。

transitive_sources

depset PyInfo.transitive_sources

與目標 srcs 以及目標遞移 depssrcs.py 檔案 (與 postorder 相容) 解組。

uses_shared_libraries

bool PyInfo.uses_shared_libraries

這個目標的任何轉換 deps 是否有共用程式庫檔案 (例如 .so 檔案)。

目前 Bazel 中未使用這個欄位,日後可能會停止運作。