mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-10 15:45:15 -04:00
dev-python/toml: make numpy an optional dependency
Signed-off-by: Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com>
This commit is contained in:
@@ -6,7 +6,7 @@ EAPI=8
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{12..15} )
|
||||
|
||||
inherit distutils-r1
|
||||
inherit distutils-r1 optfeature
|
||||
|
||||
TT_PV=2.1.0
|
||||
TT_P="toml-test-${TT_PV}"
|
||||
@@ -27,7 +27,13 @@ LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
|
||||
RDEPEND="dev-python/numpy[${PYTHON_USEDEP}]"
|
||||
BDEPEND="
|
||||
test? (
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/numpy[${PYTHON_USEDEP}]
|
||||
' python3_{12..14})
|
||||
)
|
||||
"
|
||||
|
||||
EPYTEST_PLUGINS=()
|
||||
distutils_enable_tests pytest
|
||||
@@ -39,3 +45,7 @@ src_prepare() {
|
||||
mv "${WORKDIR}/${TT_P}" toml-test || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature "toml.TomlNumpyEncoder" dev-python/numpy
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user