dev-python/mypy: new package, add 1.14.1-r1
Signed-off-by: Andreas Billmeier <b@edevau.net>
This commit is contained in:
parent
024c4bafc2
commit
f7233bbb4a
@ -606,11 +606,11 @@ A daily compile test is run at Github with Python 3.9 to catch general faults. E
|
||||
|
||||
## Licenses
|
||||
This repository itself is released under GPL-3 (like most Gentoo repositories), all work on the depending components under the licenses they came from. Perhaps you came here because I filed an issue at your component about a bad or missing license. It is easy to [assign a license](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-license-to-a-repository). During cleanups and license investigations I have been asked often which license to choose. I am not a lawyer, but I can offer the following table, counted over this repository, perhaps this helps your decision. If a package has more than one license listed, all of them are counted.
|
||||
There are 2383 Ebuilds in total, 2365 of them have in total 2409 (43 different) licenses assigned.
|
||||
There are 2384 Ebuilds in total, 2366 of them have in total 2410 (43 different) licenses assigned.
|
||||
|
||||
|License| Ebuilds using it|
|
||||
|-------|-----|
|
||||
|MIT|1354|
|
||||
|MIT|1355|
|
||||
|Apache-2.0|551|
|
||||
|GPL-3|149|
|
||||
|BSD|128|
|
||||
|
||||
3
dev-python/mypy/Manifest
Normal file
3
dev-python/mypy/Manifest
Normal file
@ -0,0 +1,3 @@
|
||||
DIST mypy-1.14.1.gh.tar.gz 3231068 BLAKE2B b88ea11fd88acaa59001ec1c1665d6beccaecf834cf0064d0e3a94d93c0a7cc1269c24f1f8a6950d114606f292c934cddc3c708e0dbdb25b6f632c5e3e64a8d4 SHA512 ddbd1445fe680c3326a09aead85cf8c810cb71c42faf723910f31a7938f20b1ae55b6bd5a0e966b93a54ba14773cffcf0b85b65421442f11f3571ea1f6d4f709
|
||||
EBUILD mypy-1.14.1-r1.ebuild 3878 BLAKE2B 22acc0444091a5cacc41ab4f9bbb0d2eba93eb9199a13866eccf44ffe511308cd1e3f4ab012a18fbb921629381de5dfa2749503ba07e6fc6d3304ca09235bea7 SHA512 89f94e342428caaa4b949c7d435a59a533ca49ebbecdf0c725e5c9a2541e34778b46517cf5ff596d657e3ba499f9eedd85695d66d43232f5c44b9790d6a2e53a
|
||||
MISC metadata.xml 507 BLAKE2B 927510c2c97362f455ada684b2de44d525c686c0cf4e4880813d48c72e897f591aed2f51aa8d129b9615525c9f63d490edd421b9a332d2638d74c04cbedb0cc6 SHA512 446ee81214e2deb4aedb1701fc0db6ba61da5881513dd3f1a87e4d97a76dd10ade3e7604e3c45871771439fc8bd68f8e2ceb18580e54f4518b56755dd8c15dc0
|
||||
16
dev-python/mypy/metadata.xml
Normal file
16
dev-python/mypy/metadata.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>b@edevau.net</email>
|
||||
<name>Andreas Billmeier</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="pypi">mypy</remote-id>
|
||||
<remote-id type="github">python/mypy</remote-id>
|
||||
<maintainer status="unknown">
|
||||
<email>jukka.lehtosalo@iki.fi</email>
|
||||
<name>Jukka Lehtosalo</name>
|
||||
</maintainer>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
125
dev-python/mypy/mypy-1.14.1-r1.ebuild
Normal file
125
dev-python/mypy/mypy-1.14.1-r1.ebuild
Normal file
@ -0,0 +1,125 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_EXT=1
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
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="amd64 arm arm64 ~loong ppc ppc64 ~riscv ~s390 sparc x86"
|
||||
IUSE="+native-extensions"
|
||||
|
||||
# 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.6.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/mypy-extensions-1.0.0[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/tomli[${PYTHON_USEDEP}]
|
||||
' 3.10)
|
||||
"
|
||||
BDEPEND="
|
||||
native-extensions? (
|
||||
${RDEPEND}
|
||||
dev-python/types-psutil[${PYTHON_USEDEP}]
|
||||
dev-python/types-setuptools[${PYTHON_USEDEP}]
|
||||
)
|
||||
test? (
|
||||
>=dev-python/attrs-18.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/filelock-3.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/lxml-4.9.1[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
EPYTEST_XDIST=1
|
||||
distutils_enable_tests pytest
|
||||
|
||||
# frustratingly, mypyc produces non-deterministic output. If ccache is enabled it will be a waste of time,
|
||||
# but simultaneously it might trash your system and fill up the cache with a giant wave of non-reproducible
|
||||
# test files (https://github.com/mypyc/mypyc/issues/1014)
|
||||
export CCACHE_DISABLE=1
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.14.0-no-werror.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
distutils-r1_src_prepare
|
||||
|
||||
# don't force pytest-xdist, in case user asked for EPYTEST_JOBS=1
|
||||
sed -i -e '/addopts/s:-nauto::' pyproject.toml || die
|
||||
}
|
||||
|
||||
python_compile() {
|
||||
local -x MYPY_USE_MYPYC=$(usex native-extensions 1 0)
|
||||
distutils-r1_python_compile
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local EPYTEST_DESELECT=(
|
||||
# the majority of them require Internet (via pip)
|
||||
mypy/test/testpep561.py
|
||||
# known broken with assertions enabled
|
||||
# https://github.com/python/mypy/issues/16043
|
||||
mypyc/test/test_run.py::TestRun::run-i64.test::testI64GlueMethodsAndInheritance
|
||||
mypyc/test/test_run.py::TestRun::run-floats.test::testFloatOps
|
||||
mypyc/test/test_run.py::TestRunStrictDunderTyping::run-floats.test::testFloatOps_dunder_typing
|
||||
# these assume that types-docutils are not installed
|
||||
mypy/test/testpythoneval.py::PythonEvaluationSuite::pythoneval.test::testIgnoreImportIfNoPython3StubAvailable
|
||||
mypy/test/testpythoneval.py::PythonEvaluationSuite::pythoneval.test::testNoPython3StubAvailable
|
||||
# TODO
|
||||
mypy/test/meta/test_parse_data.py
|
||||
mypy/test/meta/test_update_data.py
|
||||
)
|
||||
case ${EPYTHON} in
|
||||
python3.13)
|
||||
;&
|
||||
python3.12)
|
||||
EPYTEST_DESELECT+=(
|
||||
# more assertions, sigh
|
||||
mypyc/test/test_run.py::TestRun::run-bools.test::testBoolOps
|
||||
mypyc/test/test_run.py::TestRun::run-i64.test::testI64BasicOps
|
||||
mypyc/test/test_run.py::TestRun::run-i64.test::testI64DefaultArgValues
|
||||
mypyc/test/test_run.py::TestRun::run-i64.test::testI64ErrorValuesAndUndefined
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Some mypy/test/testcmdline.py::PythonCmdlineSuite tests
|
||||
# fail with high COLUMNS values
|
||||
local -x COLUMNS=80
|
||||
|
||||
# The tests depend on having in-source compiled extensions if you want to
|
||||
# test those compiled extensions. Various crucial test dependencies aren't
|
||||
# installed. Even pyproject.toml is needed because that's where pytest args
|
||||
# are in. Hack them into the build directory and delete them afterwards.
|
||||
# See: https://github.com/python/mypy/issues/16143
|
||||
local -x MYPY_TEST_PREFIX="${S}"
|
||||
cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
|
||||
cp -r "${S}"/{conftest.py,pyproject.toml} . || die
|
||||
|
||||
local failed=
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
nonfatal epytest || failed=1
|
||||
|
||||
rm conftest.py pyproject.toml || die
|
||||
|
||||
[[ ${failed} ]] && die "epytest failed with ${EPYTHON}"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user