From af4788fdefd156efdb9ce7ffbeb57c8f73898e43 Mon Sep 17 00:00:00 2001
From: Ryan Marcellino <67644978+myan-rarcellino-nnl@users.noreply.github.com>
Date: Wed, 24 Aug 2022 00:23:23 -0400
Subject: New package: py-griffe and new build backend: py-pdm-pep517 (#32335)
* New package: py-griffe and new build backend: py-pdm-pep517
* add pdm to build backend docs
---
lib/spack/docs/build_systems/pythonpackage.rst | 16 ++++++++++++++--
.../repos/builtin/packages/py-griffe/package.py | 22 ++++++++++++++++++++++
.../builtin/packages/py-pdm-pep517/package.py | 18 ++++++++++++++++++
3 files changed, 54 insertions(+), 2 deletions(-)
create mode 100644 var/spack/repos/builtin/packages/py-griffe/package.py
create mode 100644 var/spack/repos/builtin/packages/py-pdm-pep517/package.py
diff --git a/lib/spack/docs/build_systems/pythonpackage.rst b/lib/spack/docs/build_systems/pythonpackage.rst
index 0a35c46419..13b59cc96e 100644
--- a/lib/spack/docs/build_systems/pythonpackage.rst
+++ b/lib/spack/docs/build_systems/pythonpackage.rst
@@ -50,8 +50,9 @@ important to understand.
include `setuptools `__,
`flit `_,
`poetry `_,
- `hatchling `_, and
- `meson `_.
+ `hatchling `_,
+ `meson `_, and
+ `pdm `_.
^^^^^^^^^^^
Downloading
@@ -368,6 +369,16 @@ it uses the meson build system. Meson uses the default
See https://meson-python.readthedocs.io/en/latest/usage/start.html
for more information.
+"""
+pdm
+"""
+
+If the ``pyproject.toml`` lists ``pdm.pep517.api`` as the ``build-backend``,
+it uses the PDM build system. PDM uses the default ``pyproject.toml``
+keys to list dependencies.
+
+See https://pdm.fming.dev/latest/ for more information.
+
""""""
wheels
""""""
@@ -758,3 +769,4 @@ For more information on build backend tools, see:
* poetry: https://python-poetry.org/
* hatchling: https://hatch.pypa.io/latest/
* meson: https://meson-python.readthedocs.io/
+* pdm: https://pdm.fming.dev/latest/
diff --git a/var/spack/repos/builtin/packages/py-griffe/package.py b/var/spack/repos/builtin/packages/py-griffe/package.py
new file mode 100644
index 0000000000..b3227b4834
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-griffe/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+from spack.package import *
+
+
+class PyGriffe(PythonPackage):
+ """Signatures for entire Python programs. Extract the structure, the frame,
+ the skeleton of your project, to generate API documentation or find
+ breaking changes in your API."""
+
+ homepage = "https://mkdocstrings.github.io/griffe/"
+ pypi = "griffe/griffe-0.22.0.tar.gz"
+
+ version("0.22.0", sha256="a3c25a2b7bf729ecee7cd455b4eff548f01c620b8f58a8097a800caad221f12e")
+
+ depends_on("python@3.7:", type=("build", "run"))
+ depends_on("py-pdm-pep517", type="build")
+ depends_on("py-cached-property", type=("build", "run"), when="^python@:3.7")
diff --git a/var/spack/repos/builtin/packages/py-pdm-pep517/package.py b/var/spack/repos/builtin/packages/py-pdm-pep517/package.py
new file mode 100644
index 0000000000..b9d9d65ce8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pdm-pep517/package.py
@@ -0,0 +1,18 @@
+# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+from spack.package import *
+
+
+class PyPdmPep517(PythonPackage):
+ """A PEP 517 backend for PDM that supports PEP 621 metadata."""
+
+ homepage = "https://pdm.fming.dev/latest/"
+ pypi = "pdm-pep517/pdm-pep517-1.0.4.tar.gz"
+
+ version("1.0.4", sha256="392f8c2b47c6ec20550cb8e19e24b9dbd27373413f067b56ecd75f9767f93015")
+
+ depends_on("python@3.7:", type=("build", "run"))
--
cgit v1.2.3-70-g09d2