From d8f23c0f6d7f94f00c6cfc5bced3638f459d2ff7 Mon Sep 17 00:00:00 2001 From: Mihael Hategan Date: Fri, 1 Oct 2021 16:58:39 -0700 Subject: [PATCH] Added py-typeguard package. (#26411) Co-authored-by: Bernhard Kaindl --- .../py-sphinx-autodoc-typehints/package.py | 25 +++++++++++++++++++ .../builtin/packages/py-typeguard/package.py | 23 +++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-sphinx-autodoc-typehints/package.py create mode 100644 var/spack/repos/builtin/packages/py-typeguard/package.py diff --git a/var/spack/repos/builtin/packages/py-sphinx-autodoc-typehints/package.py b/var/spack/repos/builtin/packages/py-sphinx-autodoc-typehints/package.py new file mode 100644 index 0000000000..0e842d1596 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-sphinx-autodoc-typehints/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2020 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) + + +class PySphinxAutodocTypehints(PythonPackage): + """ + Type hints (PEP 484) support for the Sphinx autodoc extension + """ + + homepage = 'https://github.com/agronholm/sphinx-autodoc-typehints' + pypi = 'sphinx-autodoc-typehints/sphinx-autodoc-typehints-1.12.0.tar.gz' + + version('1.12.0', sha256='193617d9dbe0847281b1399d369e74e34cd959c82e02c7efde077fca908a9f52') + + depends_on('python@3.6:', type=('build', 'run')) + depends_on('py-setuptools@36.2.7:', type='build') + depends_on('py-setuptools-scm@1.7.0:', type='build') + depends_on('py-sphinx@3.2.0:', type='build') + depends_on('py-dataclasses', type=('test', 'run'), when='^python@:3.6') + depends_on('py-pytest@3.1.0:', type=('test', 'run')) + depends_on('py-sphobjinv@2.0:', type=('test', 'run')) + depends_on('py-typing-extensions@3.5:', type=('test', 'run')) + depends_on('py-typed-ast', type=('test', 'run')) diff --git a/var/spack/repos/builtin/packages/py-typeguard/package.py b/var/spack/repos/builtin/packages/py-typeguard/package.py new file mode 100644 index 0000000000..b8765f4ec0 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-typeguard/package.py @@ -0,0 +1,23 @@ +# Copyright 2013-2020 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) + + +class PyTypeguard(PythonPackage): + """ + Run-time type checker for Python + """ + + homepage = "https://github.com/agronholm/typeguard" + pypi = "typeguard/typeguard-2.12.1.tar.gz" + + version('2.12.1', sha256='c2af8b9bdd7657f4bd27b45336e7930171aead796711bc4cfc99b4731bb9d051') + + depends_on('python@3.5.3:', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-sphinx-rtd-theme', type='build') + depends_on('py-sphinx-autodoc-typehints', type='build') + depends_on('py-pytest', type=('test', 'run')) + depends_on('py-typing-extensions', type=('test', 'run')) + depends_on('py-mypy', type=('test', 'run'))