summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-10-10 20:13:42 +0200
committerMichał Górny <mgorny@gentoo.org>2023-10-10 22:47:15 +0200
commita17d5495a301a8cabb9481e8333919b313af6985 (patch)
tree1f0829e72191f289ba778a71e92cd1cc4d7eff8c /dev-python/mypy
parentsys-kernel/vanilla-sources: add 5.4.258 (diff)
downloadgentoo-a17d5495a301a8cabb9481e8333919b313af6985.tar.gz
gentoo-a17d5495a301a8cabb9481e8333919b313af6985.tar.bz2
gentoo-a17d5495a301a8cabb9481e8333919b313af6985.zip
dev-python/mypy: Bump to 1.6.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/mypy')
-rw-r--r--dev-python/mypy/Manifest1
-rw-r--r--dev-python/mypy/mypy-1.6.0.ebuild60
2 files changed, 61 insertions, 0 deletions
diff --git a/dev-python/mypy/Manifest b/dev-python/mypy/Manifest
index 7dc1382b38bc..e6cbb3781940 100644
--- a/dev-python/mypy/Manifest
+++ b/dev-python/mypy/Manifest
@@ -1 +1,2 @@
DIST mypy-1.5.1.gh.tar.gz 2901212 BLAKE2B b136cf061162bc50a48f1556763d7a1258b5a29b63a77db9190f89c56d3e85375a2b0e826d75472a0dc37df4d3391f2d85bb5f1f29c2907055a978e3c8d75906 SHA512 2c81322c0e7d9621e6d189f4d9d25d77c5fd6decbb563c8d0015e0f94ff1ff8206e5b7a38884edd3eedb99e839c03283ebfa7d86577c9f8e0d707c0cc4eb8fed
+DIST mypy-1.6.0.gh.tar.gz 2923757 BLAKE2B 15e0fe124b7024a3e89a8c32c13404f33bc56a3ff29375d006bfcaf9de359ea59025ba07e3726c7a4b402f4b7aca1256859585e1500891fb1e5f996b19dd499a SHA512 245324a5ec8a98e18c31159c5cb907ce1b60323428942b9fd60909a3b117ae46eeb97792fb1f30562fa411edb6c9e903f87b5b232a4be1242abe28d88406f7c4
diff --git a/dev-python/mypy/mypy-1.6.0.ebuild b/dev-python/mypy/mypy-1.6.0.ebuild
new file mode 100644
index 000000000000..c01c106ab99f
--- /dev/null
+++ b/dev-python/mypy/mypy-1.6.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1 multiprocessing
+
+DESCRIPTION="Optional static typing for Python"
+HOMEPAGE="
+ https://www.mypy-lang.org/
+ https://github.com/python/mypy/
+ https://pypi.org/project/mypy/
+"
+SRC_URI="
+ https://github.com/python/mypy/archive/v${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+# stubgen collides with this package: https://bugs.gentoo.org/585594
+RDEPEND="
+ !dev-util/stubgen
+ >=dev-python/psutil-4[${PYTHON_USEDEP}]
+ >=dev-python/typing-extensions-4.1.0[${PYTHON_USEDEP}]
+ >=dev-python/mypy_extensions-1.0.0[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '
+ dev-python/tomli[${PYTHON_USEDEP}]
+ ' 3.{9..10})
+"
+BDEPEND="
+ test? (
+ >=dev-python/attrs-18.0[${PYTHON_USEDEP}]
+ >=dev-python/filelock-3.3.0[${PYTHON_USEDEP}]
+ >=dev-python/lxml-4.4.0[${PYTHON_USEDEP}]
+ >=dev-python/pytest-7.4.0[${PYTHON_USEDEP}]
+ >=dev-python/pytest-xdist-1.18[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+# this requires packaging a lot of type stubs
+export MYPY_USE_MYPYC=0
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # the majority of them require Internet (via pip)
+ mypy/test/testpep561.py
+ )
+ # Some mypy/test/testcmdline.py::PythonCmdlineSuite tests
+ # fail with high COLUMNS values
+ local -x COLUMNS=80
+ epytest -n "$(makeopts_jobs)" --dist=worksteal
+}