-
-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
52 changed files
with
2,741 additions
and
1,125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Build environment configuration | ||
|
||
----- | ||
|
||
You can fully alter the behavior of the environment used by the [`build`](../../cli/reference.md#hatch-build) command. | ||
|
||
## Dependencies | ||
|
||
Build environments will always have what is required by the [build system](../build.md#build-system), [targets](../build.md#target-dependencies), and [hooks](../build.md#hook-dependencies). | ||
|
||
You can define [dependencies](../environment/overview.md#dependencies) that your builds may require in the environment as well: | ||
|
||
```toml config-example | ||
[tool.hatch.envs.hatch-build] | ||
dependencies = [ | ||
"cython", | ||
] | ||
``` | ||
|
||
!!! warning "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](../environment/overview.md#environment-variables) that will be set during builds: | ||
|
||
```toml config-example | ||
[tool.hatch.envs.hatch-build.env-vars] | ||
SOURCE_DATE_EPOCH = "1580601600" | ||
``` | ||
|
||
## Installer | ||
|
||
By default, [UV is enabled](../../how-to/environment/select-installer.md). You may disable that behavior as follows: | ||
|
||
```toml config-example | ||
[tool.hatch.envs.hatch-build] | ||
installer = "pip" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.