Skip to content

Commit 6be791e

Browse files
committed
dev-python/mypy-dev: add 1.11.0_alpha3, drop 1.10.0_alpha3
Closes: https://git.edevau.net/onkelbeh/HomeAssistantRepository/issues/3522 Signed-off-by: Andreas Billmeier <[email protected]>
1 parent fe58381 commit 6be791e

File tree

3 files changed

+113
-28
lines changed

3 files changed

+113
-28
lines changed

dev-python/mypy-dev/Manifest

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
DIST mypy-dev-1.10.0a3.tar.gz 3020160 BLAKE2B 66c7fc38176b21299ac3f71205f62d5c930187e8e4302fc0f5767d49783df56c0bacbd34319d73d164c23decaca1d84305e14249d052748d1990ec8773f3e089 SHA512 0bde75b4764dfd82f75117a6a558c2f964d47088a6660cd8d7b34329e46405cf5a4ea8b2ce0aef85976c6bc013c9269fdb2a2245cd7f834bba6728ca421e6b21
2-
EBUILD mypy-dev-1.10.0_alpha3.ebuild 632 BLAKE2B 2c229a84bd5cee9b3c16bb94cbd740008f140f6e8600249b8ab5e867fa2ea54d4469cd42275168897857d566b614dbaa9f4b9ae6f2859311033d3c7379fb497a SHA512 5f4aef37d499a542a8d5b396c98c6f1fa0bd00bbe700535e91c61864ba04d8709f6536f6a3c32b53e2f4b392fde96a37a93f227384796ecc9cb7e755a28f8747
1+
DIST mypy_dev-1.11.0a3.tar.gz 3037719 BLAKE2B be0d160a34f36f5e603a9563028bf2fa038e9d646dc8ab066a534b47034963bd27214f367c46e82f5b1c147634ababcb3d5b0dd69daab8a0117cc857b71f78b7 SHA512 d2a022eccab3bb0f1e466c2bd25ca56d25e3c2f549c05687e89bb653a990d44797da44527d927d4cd3c1f4f78854a6f24a196da6bb2bb4322a56c3f32f76853c
2+
EBUILD mypy-dev-1.11.0_alpha3.ebuild 3725 BLAKE2B 103d64c0f3d9e6f6da8155775823b7c529c609500df4782403a339fc41e224360a5ec62c501c93933e6c1c3ff3371ca75e6e841c35b6e9202457ffe83a0b379f SHA512 9c524dbc2787fb1b3fe645350b43924ca8b7d588424387ccc6d64c1e9751debb53fff0ffc42c2ab062f4034b28cb489e62bde49404f834b889203729f8376b91
33
MISC metadata.xml 511 BLAKE2B 1c85dbedb29c4cf67aa7d93d6cb3173d21249fa220643a4068e02b0a7a2474c599d0b62dc4a5c7d2f34a87ab1b1d721c48a8024c1afda18ce1f991701ec1c614 SHA512 1ecd629a1f01fef96d2b207bfd284a596f6c18353a507f47cf1b1e03f98f78c21d860a256233a75cffb7806c05624c70d0ab371191001042a5c3ceb6fa5fe755

dev-python/mypy-dev/mypy-dev-1.10.0_alpha3.ebuild

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Copyright 1999-2024 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=8
5+
6+
DISTUTILS_EXT=1
7+
DISTUTILS_USE_PEP517=setuptools
8+
PYTHON_COMPAT=( python3_{11..13} )
9+
MY_PV=${PV/_alpha/a}
10+
inherit distutils-r1 pypi multiprocessing
11+
DESCRIPTION="Optional static typing for Python"
12+
HOMEPAGE="
13+
https://www.mypy-lang.org/
14+
https://github.com/python/mypy/
15+
https://pypi.org/project/mypy/
16+
https://github.com/cdce8p/mypy-dev https://pypi.org/project/mypy-dev/
17+
"
18+
SRC_URI="$(pypi_sdist_url "${PN}" "${MY_PV}")"
19+
20+
LICENSE="MIT"
21+
SLOT="0"
22+
KEYWORDS="amd64 arm arm64 x86"
23+
IUSE="+native-extensions test"
24+
RESTRICT="!test? ( test )"
25+
DOCS="README.md"
26+
27+
# stubgen collides with this package: https://bugs.gentoo.org/585594
28+
RDEPEND="
29+
!dev-util/stubgen
30+
>=dev-python/psutil-4[${PYTHON_USEDEP}]
31+
>=dev-python/typing-extensions-4.1.0[${PYTHON_USEDEP}]
32+
>=dev-python/mypy_extensions-1.0.0[${PYTHON_USEDEP}]
33+
$(python_gen_cond_dep '
34+
dev-python/tomli[${PYTHON_USEDEP}]
35+
' 3.10)
36+
"
37+
BDEPEND="
38+
native-extensions? (
39+
${RDEPEND}
40+
dev-python/types-psutil[${PYTHON_USEDEP}]
41+
dev-python/types-setuptools[${PYTHON_USEDEP}]
42+
)
43+
test? (
44+
>=dev-python/attrs-18.0[${PYTHON_USEDEP}]
45+
>=dev-python/filelock-3.3.0[${PYTHON_USEDEP}]
46+
>=dev-python/lxml-4.9.1[${PYTHON_USEDEP}]
47+
)
48+
"
49+
50+
EPYTEST_XDIST=1
51+
distutils_enable_tests pytest
52+
53+
# frustratingly, mypyc produces non-deterministic output. If ccache is enabled it will be a waste of time,
54+
# but simultaneously it might trash your system and fill up the cache with a giant wave of non-reproducible
55+
# test files (https://github.com/mypyc/mypyc/issues/1014)
56+
export CCACHE_DISABLE=1
57+
58+
src_compile() {
59+
local -x MYPY_USE_MYPYC=$(usex native-extensions 1 0)
60+
distutils-r1_src_compile
61+
}
62+
63+
python_test() {
64+
local EPYTEST_DESELECT=(
65+
# the majority of them require Internet (via pip)
66+
mypy/test/testpep561.py
67+
# known broken with assertions enabled
68+
# https://github.com/python/mypy/issues/16043
69+
mypyc/test/test_run.py::TestRun::run-i64.test::testI64GlueMethodsAndInheritance
70+
mypyc/test/test_run.py::TestRun::run-floats.test::testFloatOps
71+
# these assume that types-docutils are not installed
72+
mypy/test/testpythoneval.py::PythonEvaluationSuite::pythoneval.test::testIgnoreImportIfNoPython3StubAvailable
73+
mypy/test/testpythoneval.py::PythonEvaluationSuite::pythoneval.test::testNoPython3StubAvailable
74+
# TODO
75+
mypy/test/meta/test_parse_data.py
76+
mypy/test/meta/test_update_data.py
77+
mypy/test/teststubtest.py::StubtestUnit::test_runtime_typing_objects
78+
)
79+
case ${EPYTHON} in
80+
python3.12)
81+
EPYTEST_DESELECT+=(
82+
# more assertions, sigh
83+
mypyc/test/test_run.py::TestRun::run-bools.test::testBoolOps
84+
mypyc/test/test_run.py::TestRun::run-i64.test::testI64BasicOps
85+
mypyc/test/test_run.py::TestRun::run-i64.test::testI64DefaultArgValues
86+
mypyc/test/test_run.py::TestRun::run-i64.test::testI64ErrorValuesAndUndefined
87+
)
88+
;;
89+
esac
90+
91+
# Some mypy/test/testcmdline.py::PythonCmdlineSuite tests
92+
# fail with high COLUMNS values
93+
local -x COLUMNS=80
94+
95+
# The tests depend on having in-source compiled extensions if you want to
96+
# test those compiled extensions. Various crucial test dependencies aren't
97+
# installed. Even pyproject.toml is needed because that's where pytest args
98+
# are in. Hack them into the build directory and delete them afterwards.
99+
# See: https://github.com/python/mypy/issues/16143
100+
local -x MYPY_TEST_PREFIX="${S}"
101+
cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
102+
cp -r "${S}"/{conftest.py,pyproject.toml} . || die
103+
104+
local failed=
105+
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
106+
nonfatal epytest -n "$(makeopts_jobs)" --dist=worksteal || failed=1
107+
108+
rm conftest.py pyproject.toml || die
109+
110+
[[ ${failed} ]] && die "epytest failed with ${EPYTHON}"
111+
}

0 commit comments

Comments
 (0)