diff options
-rw-r--r-- | eclass/distutils-r1.eclass | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index f283aa90cfaa..f56fa5a51efa 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -55,6 +55,11 @@ esac # Set this variable to a non-null value if the package (possibly # optionally) builds Python extensions (loadable modules written in C, # Cython, Rust, etc.). +# +# When enabled, the eclass: +# +# - adds PYTHON_DEPS to DEPEND (for cross-compilation support), unless +# DISTUTILS_OPTIONAL is used # @ECLASS_VARIABLE: DISTUTILS_OPTIONAL # @DEFAULT_UNSET @@ -317,6 +322,10 @@ _distutils_set_globals() { RDEPEND="${PYTHON_DEPS} ${rdep}" BDEPEND="${PYTHON_DEPS} ${bdep}" REQUIRED_USE=${PYTHON_REQUIRED_USE} + + if [[ ${DISTUTILS_EXT} ]]; then + DEPEND="${PYTHON_DEPS}" + fi fi } _distutils_set_globals |