[PATCH 47/94] dev-python/mypy: make dev-python/psutil an optfeature

Sam James <[email protected]>
Newsgroups gmane.linux.gentoo.devel
Message-ID <7ccc2a607ebe889a0207b676ca9ac9aa5a5ba300.1774994326.git.sam@gentoo.org>
It's optional upstream (see upstream commit 55dadfc2d56206538dbc657f339b8c30065a1429)
and used only to report memory usage in `dmypy status -v`.

Unfortunately, psutil rejected a Hurd port: https://github.com/giampaolo/psutil/pull/2462

Signed-off-by: Sam James <[email protected]>
---
 .../{mypy-1.19.1.ebuild => mypy-1.19.1-r2.ebuild}    | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
 copy dev-python/mypy/{mypy-1.19.1.ebuild => mypy-1.19.1-r2.ebuild} (93%)

diff --git a/dev-python/mypy/mypy-1.19.1.ebuild b/dev-python/mypy/mypy-1.19.1-r2.ebuild
similarity index 93%
copy from dev-python/mypy/mypy-1.19.1.ebuild
copy to dev-python/mypy/mypy-1.19.1-r2.ebuild
index bed34d44c33ab..b04dfe5dbf6fb 100644
--- a/dev-python/mypy/mypy-1.19.1.ebuild
+++ b/dev-python/mypy/mypy-1.19.1-r2.ebuild
@@ -7,7 +7,7 @@ DISTUTILS_EXT=1
 DISTUTILS_USE_PEP517=setuptools
 PYTHON_COMPAT=( python3_{11..14} )
 
-inherit distutils-r1
+inherit distutils-r1 optfeature
 
 DESCRIPTION="Optional static typing for Python"
 HOMEPAGE="
@@ -22,7 +22,7 @@ SRC_URI="
 
 LICENSE="MIT"
 SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390"
+KEYWORDS="~amd64 ~arm64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~x86"
 IUSE="native-extensions"
 
 # stubgen collides with this package: https://bugs.gentoo.org/585594
@@ -30,8 +30,7 @@ RDEPEND="
 	!dev-util/stubgen
 	>=dev-python/librt-0.6.2[${PYTHON_USEDEP}]
 	>=dev-python/mypy-extensions-1.0.0[${PYTHON_USEDEP}]
-	>=dev-python/pathspec-0.9.0[${PYTHON_USEDEP}]
-	>=dev-python/psutil-4[${PYTHON_USEDEP}]
+	>=dev-python/pathspec-1.0.0[${PYTHON_USEDEP}]
 	>=dev-python/typing-extensions-4.6.0[${PYTHON_USEDEP}]
 "
 BDEPEND="
@@ -58,6 +57,7 @@ export CCACHE_DISABLE=1
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-1.14.0-no-werror.patch
+	"${FILESDIR}"/${PN}-1.19.1-update-pathspec.patch
 )
 
 src_prepare() {
@@ -123,3 +123,7 @@ python_test() {
 
 	[[ ${failed} ]] && die "epytest failed with ${EPYTHON}"
 }
+
+pkg_postinst() {
+	optfeature "dmypy status -v support for memory use" dev-python/psutil
+}
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.