Binary builder¶バイナリビルダー¶
This uses PyApp to build an application that is able to bootstrap itself at runtime.これはPyAppを使用して、実行時に自己ブートストラップできるアプリケーションを構築します。
Configuration¶設定¶
The builder plugin name is binary.ビルダープラグイン名は binary です。
[tool.hatch.build.targets.binary]
[build.targets.binary]
Options¶オプション¶
| Optionオプション | Defaultデフォルト | Description説明 |
|---|---|---|
scriptsscripts | all definedすべて定義済み | An array of defined script names to limit what gets builtビルドされるものを制限するために定義された スクリプト 名の配列 |
python-versionpython-version | latest compatible Python minor version最新の互換性のあるPythonマイナーバージョン | The Python version ID to use使用する PythonバージョンID |
pyapp-versionpyapp-version | The version of PyApp to use使用するPyAppのバージョン |
Build behavior¶ビルド動作¶
If any scripts are defined then each one will be built (limited by the scripts option). Otherwise, a single executable will be built based on the project name assuming there is an equivalently named module with a __main__.py file.もし定義されたスクリプトがあれば、それぞれがビルドされます(scriptsオプションによって制限されます)。そうでなければ、プロジェクト名に基づいて単一の実行可能ファイルがビルドされます。__main__.pyファイルを持つ同名のモジュールが存在することを前提としています。
Every executable will be built inside an app directory in the output directory.すべての実行可能ファイルは、出力ディレクトリ内のappディレクトリにビルドされます。
If the CARGO environment variable is set then that path will be used as the executable for performing builds.もしCARGO環境変数が設定されている場合、そのパスがビルドを行うための実行可能ファイルとして使用されます。
If the CARGO_BUILD_TARGET environment variable is set then its value will be appended to the file name stems.もしCARGO_BUILD_TARGET環境変数が設定されている場合、その値がファイル名の接頭辞に追加されます。
If the PYAPP_REPO environment variable is set then a local build will be performed inside that directory rather than installing from crates.io. Note that this is required if the CARGO environment variable refers to cross.もしPYAPP_REPO環境変数が設定されている場合、そのディレクトリ内でローカルビルドが行われ、crates.ioからインストールされるのではありません。これは、CARGO環境変数がcrossを指している場合に必要です。