From 9773de6fd7a1b950088808041b69f2401ace2ad0 Mon Sep 17 00:00:00 2001 From: Jeremy Paige Date: Sun, 7 Apr 2024 14:40:58 -0700 Subject: [PATCH 1/2] update: hatch tutorial --- tutorials/get-to-know-hatch.md | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/tutorials/get-to-know-hatch.md b/tutorials/get-to-know-hatch.md index 8d56b821f..59656a14b 100644 --- a/tutorials/get-to-know-hatch.md +++ b/tutorials/get-to-know-hatch.md @@ -4,15 +4,35 @@ Our Python packaging tutorials use the tool Hatch. In this tutorial, you will install and get to know hatch a bit more before starting to use it. ## Install Hatch -To begin, install Hatch following the -[instructions here](https://hatch.pypa.io/latest/install/). +To begin, install Hatch from the command line using [pipx](https://pipx.pypa.io/stable/) + +```bash +pipx install hatch +``` + +:::{tip} +Hatch also provides pre-build binaries available from common OS package managers or directly from +the [hatch website](https://hatch.pypa.io/latest/install/). +::: :::{tip} -If you are comfortable using [pipx](https://pipx.pypa.io/stable/) to install hatch, we encourage you to do so. pipx will ensure that your package is available across all of your Python environments on your computer rather than just in the environment that you install it into. +Hatch can also be installed directly using `pip` or `conda`, but we encourage you to use `pipx`. +This is because `pipx` will ensure that your package is available across all of your Python +environments on your computer rather than just in the environment that you install it into. -However if you are not sure about pipx, you can install hatch using pip or conda. +If you install hatch this way you will have to take care that the environment it is installed into +is activated for the command to work. ::: +You can check that hatch is working properly by issuing a simple command to get the version + +```bash +hatch --version +# Hatch, version 1.9.4 +``` + +Note the version numbers will likely be different + ## Configure hatch Once you have installed hatch, you will want to customize the configuration. From 29a99430fb30ee415e8a683215c8ab372c190118 Mon Sep 17 00:00:00 2001 From: Jeremy Paige Date: Mon, 8 Apr 2024 11:11:01 -0700 Subject: [PATCH 2/2] combine pipx note paragraphs --- tutorials/get-to-know-hatch.md | 1 - 1 file changed, 1 deletion(-) diff --git a/tutorials/get-to-know-hatch.md b/tutorials/get-to-know-hatch.md index 59656a14b..becdab231 100644 --- a/tutorials/get-to-know-hatch.md +++ b/tutorials/get-to-know-hatch.md @@ -19,7 +19,6 @@ the [hatch website](https://hatch.pypa.io/latest/install/). Hatch can also be installed directly using `pip` or `conda`, but we encourage you to use `pipx`. This is because `pipx` will ensure that your package is available across all of your Python environments on your computer rather than just in the environment that you install it into. - If you install hatch this way you will have to take care that the environment it is installed into is activated for the command to work. :::