Skip to content

Commit 40eb8c6

Browse files
committed
A few more fixes to the build tools page
1 parent b64b59a commit 40eb8c6

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

package-structure-code/python-package-build-tools.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -274,14 +274,14 @@ packages them with the pure Python files.
274274
:widths: 20,5,50
275275
276276
Use Other Build Backends, ✅, When you setup PDM it allows you to select from Hatch; PDM-517 and PDM-core build tools. PDM also can work with Meson-Python which supports move complex python builds.
277-
Dependency management & lock files ,✅,PDM and Poetry are currently the only tools that support creating dependency lock files. However their default approach to creating lock files is different: Poetry uses an upper bound lock approach `^` by default. <!--Most users won't know what upper bound means--> PDM uses an open lock `>=` approach. Lock files might be most useful to developers creating web apps where locking the environment is critical for consistent user experience.
277+
Dependency management & lock files ,✅,PDM and Poetry are currently the only tools that support creating dependency lock files. Their default dependency constraint approach to creating lock files is different: Poetry uses a default [upper bound lock](https://python-poetry.org/docs/dependency-specification/#version-constraints) `^`. This means that Poetry will always never bump a dependency to the next major version (ie from 1.2 to 2.0). PDM uses an open lock `>=` approach by default but also allows you to [customize how you want locking constraints to be implemented](https://pdm.fming.dev/latest/usage/dependency/#about-update-strategy). Thus with PDM you can explicitly tell it to lock using upper bounds like Poetry. Or you can tell it to use other strategies. This makes PDM one of the most flexible tools for creating lock files. Lock files are often most useful to developers creating web apps where locking the environment is critical for consistent user experience.
278278
Select your environment manager of choice (conda; venv; etc),✅ , PDM allows you to select the environment manager that you want to use for managing your package.
279279
Publish to PyPI,✅,PDM supports publishing to both test PyPI and PyPI
280280
Version Control based versioning,✅ , PDM has a setuptools_scm like tool built into it which allows you to use dynamic versioning that rely on git tags.
281281
Version bumping, ✅ , PDM supports you bumping the version of your package using standard semantic version terms patch; minor; major
282282
Follows current packaging standards,✅,PDM supports current packaging standards for adding metadata to the **pyproject.toml** file. It also supports pep 517? dependency management which relies upon a local directory containing a users environment.
283283
Install your package in editable mode,✅,PDM supports installing your package in editable mode.
284-
Build your sdist and wheel distributions,✅,
284+
Build your sdist and wheel distributions,✅, Similar to all of the other tools PDM builds your packages sdist and wheel files for you.
285285
✨Optional use of PEP 582 / local environment directory✨,✅, PDM is currently the only tool that optionally supports PEP 582 (having a local environment configuration stored within a `__packages__` directory in your working package directory).
286286
```
287287

@@ -311,7 +311,7 @@ an overview of what the PDM command line interface looks like when you use it.
311311

312312
[Flit is a no-frills, streamlined packaging tool](https://flit.pypa.io/en/stable/) that supports modern Python packaging standards.
313313
Flit is a great choice if you are
314-
building a basic package to use in a local workflow that doesn't require any advanced features. More on that below.
314+
building a basic package to use in a local workflow that doesn't require any advanced features. And if your package structure is already created. More on that below.
315315

316316
### Flit Features
317317

@@ -360,12 +360,12 @@ using a tool like **Make** or **Nox**.
360360
361361
Use Other Build Backends,✖, Switching out build back-ends is not currently an option when using Hatch. However this feature is coming to the package in the near future.
362362
Dependency management,✅,Hatch can help you add dependencies to your `pyproject.toml` metadata.
363-
**??does hatch support this - i forget?** Select your environment manager of choice (conda; venv; etc),✅ , Hatch allows you to select the environment manager that you want to use for managing your package.
363+
Select your environment manager of choice (conda; venv; etc),✅ , Hatch does allow you to select the (pip) environment that you want to use for managing and building your package. However if you want to use conda [you will need to use a plugin](https://github.com/OldGrumpyViking/hatch-conda).
364364
Publish to PyPI and test PyPI,✅,Hatch supports publishing to both test PyPI and PyPI
365365
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`.
366366
Version bumping, ✅ , Hatch supports you bumping the version of your package using standard semantic version terms patch; minor; major
367367
Follows current packaging standards,✅,Hatch supports current packaging standards for adding metadata to the **pyproject.toml** file.
368-
Install your package in editable mode,✅,Hatch supports installing your package in editable mode. **TODO: add info - does it support this and what does that look like? i think it does it when you create an envt??**
368+
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.
369369
Build your sdist and wheel distributions,✅, Hatch will build the sdist and wheel distributions
370370
✨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).
371371
✨[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.
@@ -414,14 +414,14 @@ is currently undocumented. Thus, we don't recommend using Poetry for more comple
414414
:widths: 20,5,50
415415
416416
Dependency management,✅,Poetry helps you add dependencies to your `pyproject.toml` metadata. _NOTE: currently Poetry adds dependencies using an approach that is slightly out of alignment with current Python peps - however there is a plan to fix this in an upcoming release._ Allows you to organize dependencies in groups: docs; package; tests.
417-
Dependency pinning,✅ ,Poetry offers dependency pinning however it's default approach can be problematic for some packages. Read below for more.
417+
Dependency pinning,✅ ,Poetry offers dependency pinning however it's default approach can be problematic for some packages. Read below for more.
418418
Select your environment manager of choice (conda; venv; etc),✅ , Poetry allows you to either use its simple environment management tool or select the environment manager that you want to use for managing your package. [Read more about its built in environment management options](https://python-poetry.org/docs/basic-usage/#using-your-virtual-environment).
419419
Publish to PyPI and test PyPI,✅,Poetry supports publishing to both test PyPI and PyPI
420-
Version Control based versioning,✅ , The plugin (Poetry dynamic versioning)[https://github.com/mtkennerly/poetry-dynamic-versioning] supports versioning using git tags with Poetry.
420+
Version Control based versioning,✅ , The plugin [Poetry dynamic versioning](https://github.com/mtkennerly/poetry-dynamic-versioning) supports versioning using git tags with Poetry.
421421
Version bumping, ✅ , Poetry supports you bumping the version of your package using standard semantic version terms patch; minor; major
422422
Follows current packaging standards,✖✅,Poetry does not quite support current packaging standards for adding metadata to the **pyproject.toml** file but plans to fix this in an upcoming release.
423423
Install your package in editable mode,✅,Poetry supports installing your package in editable mode using `--editable`
424-
Build your sdist and wheel distributions,✅,
424+
Build your sdist and wheel distributions,✅,Poetry will build your sdist and wheel distributions using `poetry build`
425425
```
426426

427427
<!-- TODO: update this given responses here: https://github.com/python-poetry/poetry/discussions/7525 -->
@@ -469,7 +469,7 @@ offer dependency management but adheres to a >= approach when pinning (open boun
469469
avoids the issue described below with Poetry's default upper bound pinning.
470470
```
471471

472-
## Using Setuptools Back-end for Python Packaging
472+
## Using Setuptools Back-end for Python Packaging with Build Front-end
473473

474474
[Setuptools](https://setuptools.pypa.io/en/latest/) is the most
475475
mature Python packaging build tool with [development dating back to 2009 and earlier](https://setuptools.pypa.io/en/latest/history.html#).

0 commit comments

Comments
 (0)