You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: package-structure-code/python-package-build-tools.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -12,10 +12,9 @@ extensions.
12
12
13
13
:::{figure-md} package-decision-tree
14
14
15
-
<imgsrc="../images/python-package-tools-decision-tree.png"alt="Decision tree diagram showing the various front and back end packaging tools. You can decide what packaging tool to use by thinking about what features you need. PDM is currently the most flexible tool that also supports both non pure Python projects and also using different build back-ends. As such currently PDM is the tool we think beginners might appreciate most with Poetry being a close second. Poetry is ideal for pure python projects."width="700px">
15
+
<imgsrc="../images/python-package-tools-decision-tree.png"alt="Decision tree diagram showing the various front and back end packaging tools. You can decide what packaging tool to use by thinking about what features you need. PDM and Hatch are currently the most flexible tools as they also using different build back-ends. As such currently PDM and Hatch are the tools we think beginners might appreciate most with Poetry being a close second. Poetry is nice for pure Python projects."width="700px">
16
16
17
-
Diagram showing the various from end build tools that you can select from. Each tool has different features as highlighted below.
18
-
NOTE: this is still a DRAFT so i'm not going to spend time truly cleaning it up until i get lots of feedback on the general approach!!
17
+
Diagram showing the different front end build tools available to use in the Python package ecosystem that you can select from. We selected tools to include in this diagram based upon the PyPI survey which helped us understand the most populate tools in the ecosystem. Each tool has different features as highlighted below.
19
18
:::
20
19
21
20
If you want to know more about Python packages that have extensions written in
@@ -207,6 +206,7 @@ front-end tools remove the need to use other core tools in your workflow. For ex
207
206
Note that because setuptools does not offer a front-end interface, it is not
Version Control based versioning (using `git tags`)|✖|✅|✅|✅
@@ -310,7 +310,7 @@ Install your package in editable mode|✅| Flit supports installing your package
310
310
Build your sdist and wheel distributions|✅| Flit can be used to build your packages sdist and wheel distributions.
311
311
```
312
312
313
-
\*\*NOTE: _If you are using the most current version of pip, it supports both a symlink approach `flit install -s` and `pip install -e .`_
313
+
NOTE: _If you are using the most current version of pip, it supports both a symlink approach `flit install -s` and `pip install -e .`_
314
314
315
315
```{admonition} Learn more about flit
316
316
* [Why use flit?](https://flit.pypa.io/en/stable/rationale.html)
@@ -329,6 +329,7 @@ You may NOT want to use flit if:
329
329
- You have a project that is not pure Python (Use Hatch, PDM or setuptools)
330
330
- You want environment management (use PDM, Hatch or Poetry)
331
331
332
+
(hatch)=
332
333
## Hatch
333
334
334
335
[**Hatch**](https://hatch.pypa.io/latest/), similar to Poetry and PDM, provides a
@@ -345,14 +346,14 @@ as building your documentation locally. This means that you could potentially dr
345
346
:widths: 20,5,50
346
347
:delim: "|"
347
348
348
-
Use Other Build Backends|✖| Switching out build back-ends is not currently an option with Hatch. However, this feature is planned for a future release.
349
+
Use Other Build Backends|✅ | Switching out build back-ends is not currently an option with Hatch. However, this feature is planned for a future release.
349
350
Dependency management|✖| Currently you have to add dependencies manually with Hatch. However a feature to support dependencies management may be added in a future release.
350
351
Environment Management |✅ | Hatch supports Python virtual environments. If you wish to use other types of environments such as Conda, you will need to [install a plugin such as hatch-conda for conda support](https://github.com/OldGrumpyViking/hatch-conda).
351
352
Publish to PyPI and test PyPI|✅|Hatch supports publishing to both test PyPI and PyPI
352
353
Version Control based versioning|✅ | Hatch offers `hatch_vcs` which is a plugin that uses setuptools_scm to support versioning using git tags. The workflow with `hatch_vcs` is the same as that with `setuptools_scm`.
353
354
Version bumping| ✅ | Hatch supports you bumping the version of your package using standard semantic version terms patch; minor; major
354
355
Follows current packaging standards|✅|Hatch supports current packaging standards for adding metadata to the **pyproject.toml** file.
355
-
Install your package in editable mode|✖✅| You can install your package in editable mode using `pip install -e .` Hatch mentions [editable installs](https://hatch.pypa.io/latest/config/build/#dev-mode) but refers to pip in its documentation.
356
+
Install your package in editable mode|✅| Hatch will install your package into any of its environments by default in editable mode. You can install your package in editable mode manually using `pip install -e .` Hatch mentions [editable installs](https://hatch.pypa.io/latest/config/build/#dev-mode) but refers to pip in its documentation.
356
357
Build your sdist and wheel distributions|✅| Hatch will build the sdist and wheel distributions
357
358
✨Matrix environment creation to support testing across Python versions✨|✅| The matrix environment creation is a feature that is unique to Hatch in the packaging ecosystem. This feature is useful if you wish to test your package locally across Python versions (instead of using a tool such as tox).
358
359
✨[Nox / MAKEFILE like functionality](https://hatch.pypa.io/latest/environment/#selection)✨| ✅| This feature is also unique to Hatch. This functionality allows you to create workflows in the **pyproject.toml** configuration to do things like serve docs locally and clean your package build directory. This means you may have one less tool in your build workflow.
@@ -368,7 +369,6 @@ There are a few features that hatch is missing that may be important for some.
368
369
These include:
369
370
370
371
- Hatch doesn't support adding dependencies. You will have to add them manually.
371
-
- Hatch currently doesn't support use with other build back-ends. Lack of support for other build back-ends makes Hatch less desirable for users with more complex package builds. If your package is pure Python, then this won't be an issue.
372
372
- Hatch won't by default recognize Conda environments without a plugin.
373
373
- Similar to PDM, Hatch's documentation can difficult to work through, particularly if you are just getting started with creating a package.
374
374
- Hatch, similar to PDM and Flit currently only has one maintainer.
0 commit comments