Build environment configuration¶ビルド環境の構成¶
You can fully alter the behavior of the environment used by the build command.build コマンドで使用される環境の動作を完全に変更できます。
Dependencies¶依存関係¶
Build environments will always have what is required by the build system, targets, and hooks.ビルド環境は、常に ビルドシステム、ターゲット、および フック に必要なものを持っています。
You can define dependencies that your builds may require in the environment as well:ビルドに必要な 依存関係 を環境内で定義することもできます:
[tool.hatch.envs.hatch-build]
dependencies = [
"cython",
]
[envs.hatch-build]
dependencies = [
"cython",
]
caution注意
It's recommended to only use the standard mechanisms to define build dependencies for better compatibility with other tools.他のツールとの互換性を高めるために、ビルド依存関係を定義するには標準的なメカニズムのみを使用することをお勧めします。
Environment variables¶環境変数¶
You can define environment variables that will be set during builds:ビルド中に設定される 環境変数 を定義できます:
[tool.hatch.envs.hatch-build.env-vars]
SOURCE_DATE_EPOCH = "1580601600"
[envs.hatch-build.env-vars]
SOURCE_DATE_EPOCH = "1580601600"
Installer¶インストーラー¶
By default, UV is enabled. You may disable that behavior as follows:デフォルトでは、UVが有効です。この動作を無効にするには、次のようにします:
[tool.hatch.envs.hatch-build]
installer = "pip"
[envs.hatch-build]
installer = "pip"