From 5bd1074afb79710c115fc64ce49f57c424235801 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 11 Jul 2022 16:23:28 -0700 Subject: py-hatchling: add new packages, document new build backend (#31512) * py-hatchling: add new package, document new build backend * Minor doc changes Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- lib/spack/docs/build_systems/pythonpackage.rst | 33 ++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/spack/docs/build_systems/pythonpackage.rst b/lib/spack/docs/build_systems/pythonpackage.rst index b246ed1445..de79324de1 100644 --- a/lib/spack/docs/build_systems/pythonpackage.rst +++ b/lib/spack/docs/build_systems/pythonpackage.rst @@ -48,8 +48,9 @@ important to understand. **build backend** Libraries used to define how to build a wheel. Examples include `setuptools `__, - `flit `_, and - `poetry `_. + `flit `_, + `poetry `_, and + `hatchling `_. ^^^^^^^^^^^ Downloading @@ -326,6 +327,33 @@ for specifying the version requirements. Note that ``~=`` works differently in poetry than in setuptools and flit for versions that start with a zero. +""""""""" +hatchling +""""""""" + +If the ``pyproject.toml`` lists ``hatchling.build`` as the +``build-backend``, it uses the hatchling build system. Look for +dependencies under the following keys: + +* ``requires-python`` + + This specifies the version of Python that is required + +* ``project.dependencies`` + + These packages are required for building and installation. You can + add them with ``type=('build', 'run')``. + +* ``project.optional-dependencies`` + + This section includes keys with lists of optional dependencies + needed to enable those features. You should add a variant that + optionally adds these dependencies. This variant should be ``False`` + by default. + +See https://hatch.pypa.io/latest/config/dependency/ for more +information. + """""" wheels """""" @@ -666,3 +694,4 @@ For more information on build backend tools, see: * setuptools: https://setuptools.pypa.io/ * flit: https://flit.readthedocs.io/ * poetry: https://python-poetry.org/ +* hatchling: https://hatch.pypa.io/latest/ -- cgit v1.2.3-60-g2f50