HATCH-BUILD(1)

πŸ“¦
version 1.16.4 Β· 2 versions
, in epel 10, fedora 43, fedora 44

πŸ‘‘ NAME πŸ‘‘

hatch build β€” bestie, this is the one that builds your project. That's it. That's the vibe. ✨


πŸŽ€ SYNOPSIS πŸŽ€

hatch build [OPTIONS] [LOCATION]

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so like, hatch build takes your project and builds it. Artifacts. Outputs. The whole thing. You point it at a project (that's your [LOCATION], if you even need to say it out loud β€” usually it just knows), and it does the thing. πŸ’…

There are options so you can be picky about what gets built and when, and there's a whole ENVIRONMENT section because sometimes you'd rather yell your preferences into the shell instead of typing them every single time. Both work. Both are valid. We love options. 🫢


πŸ’– OPTIONS πŸ’–

  • -t, --target TEXT β€” which target to build, slaying over whatever the project defaults say. And bestie, you can pick it more than once, like -t sdist -t wheel. Multiple targets? Multiple flags. Periodt. πŸ”₯
  • --hooks-only β€” only run the build hooks, nothing else. Yes or no, that's the question. [env var: HATCH_BUILD_HOOKS_ONLY]
  • --no-hooks β€” disables the build hooks entirely. No hooks, no drama. [env var: HATCH_BUILD_NO_HOOKS]
  • --ext β€” only run the build hooks for distributing binary Python packages, iykyk, like compiling extensions and stuff. It's literally the exact same thing as --hooks-only -t wheel. Same energy. ✨
  • -c, --clean β€” should existing artifacts get deleted first? Yes or no. Clean slate energy. [env var: HATCH_BUILD_CLEAN]
  • --clean-hooks-after β€” should the build hook artifacts get removed after each build? Yes or no. Tidy girl behavior. πŸŽ€ [env var: HATCH_BUILD_CLEAN_HOOKS_AFTER]
  • -h, --help β€” shows you a help message and then exits. The classic. πŸ™ˆ

🌈 ENVIRONMENT 🌈

Every one of these is just an option but as a little environment variable, so you can set it once and forget it. Iconic, honestly.

  • HATCH_BUILD_HOOKS_ONLY β€” only run the build hooks, yes or no. [option: --hooks-only]
  • HATCH_BUILD_NO_HOOKS β€” disable the build hooks, yes or no. [option: --no-hooks]
  • HATCH_BUILD_CLEAN β€” should existing artifacts be removed first, yes or no. [option: -c, --clean]
  • HATCH_BUILD_CLEAN_HOOKS_AFTER β€” should build hook artifacts be removed after each build, yes or no. [option: --clean-hooks-after]

⭐ SEE ALSO ⭐

The whole friend group, go say hi:

hatch-clean(1), hatch-config(1), hatch-dep(1), hatch-env(1), hatch-fmt(1), hatch-new(1), hatch-project(1), hatch-publish(1), hatch-python(1), hatch-run(1), hatch-self(1), hatch-shell(1), hatch-status(1), hatch-test(1), hatch-version(1)

and obviously the main character herself, hatch(1). πŸ‘‘


okay that's the whole page bestie, mwah πŸ’‹ This lil slice of the HATCH-BUILD(1) manual is from the User Commands crew, dated August 2024 β€” go build something gorgeous. πŸ¦‹βœ¨

πŸ“¦ where this page comes from