dev-python/typeguard: New package, needed for signature_dispatch

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2021-08-05 08:37:38 +02:00
parent 194f91f399
commit 9ce0817c44
3 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST typeguard-2.12.1.gh.tar.gz 35894 BLAKE2B 309b5fd906ae5122fbd2134ff30f6f2908a5d64fc8510dd054a9f47feef5f1674ea6133156fb6649c85a6fc8a98609387f742e7f9588db8ab008ef2caec0c740 SHA512 ea91140ba0ebfe7cc83bf212ae20aca777279fc88ff806bf6a1f4208581bb726c6091d0777371d487e7422887814d81c84ebac9f06bfacc5a929f5a2657312a8

View File

@@ -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>

View File

@@ -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 }
}