diff --git a/dev-python/dtreeviz/dtreeviz-2.2.1.ebuild b/dev-python/dtreeviz/dtreeviz-2.2.1.ebuild index 797574875f..4c8501171e 100644 --- a/dev-python/dtreeviz/dtreeviz-2.2.1.ebuild +++ b/dev-python/dtreeviz/dtreeviz-2.2.1.ebuild @@ -16,6 +16,8 @@ SRC_URI="https://github.com/parrt/dtreeviz/archive/refs/tags/${PV}.tar.gz -> ${P LICENSE="MIT" SLOT="0" KEYWORDS="~amd64" +# IUSE="test xgboost pyspark lightgbm" +IUSE="test xgboost" RDEPEND=" >=dev-python/graphviz-0.9 @@ -24,9 +26,36 @@ RDEPEND=" sci-libs/scikit-learn dev-python/matplotlib dev-python/colour - dev-python/pytest + xgboost? ( dev-python/xgboost ) " +# xgboost: available at the science overlay: https://github.com/gentoo/sci - Tested +# pyspark: available at the spark overlay: https://github.com/6-6-6/spark-overlay - Not tested +# lightgbm: available at the pypi-sci overlay: https://github.com/jiegec/gentoo-pypi-sci - Not tested -src_install() { - distutils-r1_src_install +DEPEND="test? ( dev-python/pytest )" + +TEST_DIR="testing/testlib/models" + +python_prepare_all() { + # FIXME + if ! use xgboost; then + rm $TEST_DIR/test_decision_trees_xgb_classifier.py || die + rm $TEST_DIR/test_decision_tree_xgb_regressor.py || die + fi + + # if ! use pyspark; then + rm $TEST_DIR/test_decision_tree_spark_classifier.py || die + # fi + + # if ! use lightgbm; then + rm $TEST_DIR/test_decision_tree_lightgbm_classifier.py || die + # fi + + #TODO: tensorflow_decision_forests ebuild + rm $TEST_DIR/test_decision_tree_tensorflow_classifier.py || die + + + distutils-r1_python_prepare_all } + +distutils_enable_tests pytest