summaryrefslogtreecommitdiff
path: root/dev-python/typeguard
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/typeguard')
-rw-r--r--dev-python/typeguard/Manifest3
-rw-r--r--dev-python/typeguard/metadata.xml11
-rw-r--r--dev-python/typeguard/typeguard-2.12.1.ebuild40
3 files changed, 54 insertions, 0 deletions
diff --git a/dev-python/typeguard/Manifest b/dev-python/typeguard/Manifest
new file mode 100644
index 000000000000..7e15745021db
--- /dev/null
+++ b/dev-python/typeguard/Manifest
@@ -0,0 +1,3 @@
+DIST typeguard-2.12.1.gh.tar.gz 35894 BLAKE2B 309b5fd906ae5122fbd2134ff30f6f2908a5d64fc8510dd054a9f47feef5f1674ea6133156fb6649c85a6fc8a98609387f742e7f9588db8ab008ef2caec0c740 SHA512 ea91140ba0ebfe7cc83bf212ae20aca777279fc88ff806bf6a1f4208581bb726c6091d0777371d487e7422887814d81c84ebac9f06bfacc5a929f5a2657312a8
+EBUILD typeguard-2.12.1.ebuild 981 BLAKE2B 3306b30332ad9d8f9943206995afca09ab34fa33f07e2836ab9a62621a0ba7f67b3018c1329ebff995d4ec362da06b82e2d59c7cf6701160a0977c048dd0cd44 SHA512 44a09aea91107a9eee9f24ecc1c63e6774ea00cd056728590e2995637bdbcb6cc5dd7bbbf53609adb2a30c2c58599ae508244fbfdbd159230b6073b8e31951cd
+MISC metadata.xml 349 BLAKE2B 873714697a9a764860b297dfbb7fe6132810af46e1eff9fa2748b4228522b6a9277e41eaceca817223fddab6d8e6b1b82be475c1db8ceac5b7d67846573cff16 SHA512 b15a90ad3556ed039357792d7370d9b0333307ac1e8f29bfeb93a5ae89ca10a0392c4b600392bb55fd5d4ca5367e1efdce77f326d0e535ef97c7042845b55ab4
diff --git a/dev-python/typeguard/metadata.xml b/dev-python/typeguard/metadata.xml
new file mode 100644
index 000000000000..4522c923343f
--- /dev/null
+++ b/dev-python/typeguard/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">agronholm/typeguard</remote-id>
+ <remote-id type="pypi">typeguard</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/typeguard/typeguard-2.12.1.ebuild b/dev-python/typeguard/typeguard-2.12.1.ebuild
new file mode 100644
index 000000000000..92dfba2742ea
--- /dev/null
+++ b/dev-python/typeguard/typeguard-2.12.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit distutils-r1
+
+DESCRIPTION="Run-time type checker for Python"
+HOMEPAGE="
+ https://pypi.org/project/typeguard/
+ https://github.com/agronholm/typeguard/"
+SRC_URI="
+ https://github.com/agronholm/typeguard/archive/${PV}.tar.gz
+ -> ${P}.gh.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+BDEPEND="
+ dev-python/setuptools_scm[${PYTHON_USEDEP}]
+ test? (
+ dev-python/typing-extensions[${PYTHON_USEDEP}]
+ )"
+
+distutils_enable_tests pytest
+
+export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
+
+python_test() {
+ local -x PYTHONDONTWRITEBYTECODE=
+ local deselect=()
+ [[ ${EPYTHON} == python3.10 ]] && deselect+=(
+ # https://github.com/agronholm/typeguard/issues/199
+ tests/test_typeguard.py::TestCheckArgumentTypes::test_newtype
+ )
+ # mypy changes results from version to version
+ epytest --ignore tests/mypy ${deselect[@]/#/--deselect }
+}