commit:     7c9f5b4a7858c396d473a90c0fda5fbc9a018809
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  1 18:57:59 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Feb  1 18:57:59 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c9f5b4a

sci-libs/tensorflow: Fix Python dependencies

DISTUTILS_USE_SETUPTOOLS is not used with DISTUTILS_OPTIONAL, the dep
on setuptools needs to be declared explicitly.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sci-libs/tensorflow/tensorflow-2.5.0-r3.ebuild | 15 ++++++---------
 sci-libs/tensorflow/tensorflow-2.7.0.ebuild    | 14 +++++---------
 2 files changed, 11 insertions(+), 18 deletions(-)

diff --git a/sci-libs/tensorflow/tensorflow-2.5.0-r3.ebuild 
b/sci-libs/tensorflow/tensorflow-2.5.0-r3.ebuild
index e3c79720e512..0c3051005d95 100644
--- a/sci-libs/tensorflow/tensorflow-2.5.0-r3.ebuild
+++ b/sci-libs/tensorflow/tensorflow-2.5.0-r3.ebuild
@@ -1,11 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
 DISTUTILS_OPTIONAL=1
 PYTHON_COMPAT=( python3_{7,8,9} )
-DISTUTILS_USE_SETUPTOOLS=rdepend
 MY_PV=${PV/_rc/-rc}
 MY_P=${PN}-${MY_PV}
 
@@ -106,6 +105,7 @@ RDEPEND="
                >=dev-python/opt-einsum-3.3.0[${PYTHON_USEDEP}]
                >=dev-python/protobuf-python-3.13.0[${PYTHON_USEDEP}]
                dev-python/pybind11[${PYTHON_USEDEP}]
+               dev-python/setuptools[${PYTHON_USEDEP}]
                dev-python/six[${PYTHON_USEDEP}]
                dev-python/tblib[${PYTHON_USEDEP}]
                dev-python/termcolor[${PYTHON_USEDEP}]
@@ -117,11 +117,7 @@ RDEPEND="
                >=sci-libs/keras-preprocessing-1.1.2[${PYTHON_USEDEP}]
                >=sci-visualization/tensorboard-2.5.0[${PYTHON_USEDEP}]
        )"
-DEPEND="${RDEPEND}
-       python? (
-               dev-python/mock
-               dev-python/setuptools
-       )"
+DEPEND="${RDEPEND}"
 PDEPEND="python? (
                >=sci-libs/tensorflow-estimator-2.5.0[${PYTHON_USEDEP}]
        )"
@@ -135,8 +131,9 @@ BDEPEND="
        )
        !python? ( dev-lang/python )
        python? (
-               dev-python/cython
-               dev-python/mock
+               dev-python/cython[${PYTHON_USEDEP}]
+               dev-python/mock[${PYTHON_USEDEP}]
+               dev-python/setuptools[${PYTHON_USEDEP}]
                >=dev-python/grpcio-tools-1.28
        )"
 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"

diff --git a/sci-libs/tensorflow/tensorflow-2.7.0.ebuild 
b/sci-libs/tensorflow/tensorflow-2.7.0.ebuild
index 3cfc701dff2f..2ab771170c61 100644
--- a/sci-libs/tensorflow/tensorflow-2.7.0.ebuild
+++ b/sci-libs/tensorflow/tensorflow-2.7.0.ebuild
@@ -1,11 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
 DISTUTILS_OPTIONAL=1
 PYTHON_COMPAT=( python3_{7,8,9} )
-DISTUTILS_USE_SETUPTOOLS=rdepend
 MY_PV=${PV/_rc/-rc}
 MY_P=${PN}-${MY_PV}
 
@@ -118,11 +117,7 @@ RDEPEND="
                >=net-libs/google-cloud-cpp-0.10.0
                >=sci-visualization/tensorboard-2.7.0[${PYTHON_USEDEP}]
        )"
-DEPEND="${RDEPEND}
-       python? (
-               dev-python/mock
-               dev-python/setuptools
-       )"
+DEPEND="${RDEPEND}"
 PDEPEND="python? (
                >=sci-libs/keras-2.7.0[${PYTHON_USEDEP}]
                >=sci-libs/tensorflow-estimator-2.7.0[${PYTHON_USEDEP}]
@@ -137,8 +132,9 @@ BDEPEND="
        )
        !python? ( dev-lang/python )
        python? (
-               dev-python/cython
-               dev-python/mock
+               dev-python/cython[${PYTHON_USEDEP}]
+               dev-python/mock[${PYTHON_USEDEP}]
+               dev-python/setuptools[${PYTHON_USEDEP}]
                >=dev-python/grpcio-tools-1.28
        )"
 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"

Reply via email to