From df821da327452dd7cc8e2a80300de834379e3166 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Fri, 18 Sep 2020 22:42:45 +0200 Subject: distutils-r1.eclass: Remove obsolete DISTUTILS_USE_SETUPTOOLS check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The DISTUTILS_USE_SETUPTOOLS check is now done in install-qa-check.d, so remove the duplicate. Signed-off-by: Michał Górny --- eclass/distutils-r1.eclass | 42 ------------------------------------------ 1 file changed, 42 deletions(-) (limited to 'eclass') diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index e0e7a945ab87..25cb67b78a31 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -455,47 +455,6 @@ distutils_enable_tests() { return 0 } -# @FUNCTION: _distutils-r1_verify_use_setuptools -# @INTERNAL -# @DESCRIPTION: -# Check setup.py for signs that DISTUTILS_USE_SETUPTOOLS have been set -# incorrectly. -_distutils_verify_use_setuptools() { - [[ ${DISTUTILS_OPTIONAL} ]] && return - [[ ${DISTUTILS_USE_SETUPTOOLS} == manual ]] && return - [[ ${DISTUTILS_USE_SETUPTOOLS} == pyproject.toml ]] && return - - # ok, those are cheap greps. we can try toimprove them if we hit - # false positives. - local expected=no - if [[ ${CATEGORY}/${PN} == dev-python/setuptools ]]; then - # as a special case, setuptools provides itself ;-) - : - elif grep -E -q -s '(from|import)\s+setuptools' setup.py; then - if grep -E -q -s 'entry_points\s*=' setup.py; then - expected=rdepend - elif grep -F -q -s '[options.entry_points]' setup.cfg; then - expected=rdepend - elif grep -F -q -s '[entry_points]' setup.cfg; then # pbr - expected=rdepend - else - expected=bdepend - fi - fi - - if [[ ${DISTUTILS_USE_SETUPTOOLS} != ${expected} ]]; then - if [[ ! ${_DISTUTILS_SETUPTOOLS_WARNED} ]]; then - _DISTUTILS_SETUPTOOLS_WARNED=1 - local def= - [[ ${DISTUTILS_USE_SETUPTOOLS} == bdepend ]] && def=' (default?)' - - eqawarn "DISTUTILS_USE_SETUPTOOLS value is probably incorrect" - eqawarn " value: DISTUTILS_USE_SETUPTOOLS=${DISTUTILS_USE_SETUPTOOLS}${def}" - eqawarn " expected: DISTUTILS_USE_SETUPTOOLS=${expected}" - fi - fi -} - # @FUNCTION: esetup.py # @USAGE: [...] # @DESCRIPTION: @@ -518,7 +477,6 @@ esetup.py() { [[ ${EAPI} != [45] ]] && die_args+=( -n ) [[ ${BUILD_DIR} ]] && _distutils-r1_create_setup_cfg - _distutils_verify_use_setuptools set -- "${EPYTHON:-python}" setup.py "${mydistutilsargs[@]}" "${@}" -- cgit v1.2.3-65-gdbad