commit: df821da327452dd7cc8e2a80300de834379e3166
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 18 20:42:45 2020 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Sep 21 15:30:02 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df821da3
distutils-r1.eclass: Remove obsolete DISTUTILS_USE_SETUPTOOLS check
The DISTUTILS_USE_SETUPTOOLS check is now done in install-qa-check.d,
so remove the duplicate.
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
eclass/distutils-r1.eclass | 42 ------------------------------------------
1 file changed, 42 deletions(-)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index e0e7a945ab8..25cb67b78a3 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: [<args>...]
# @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[@]}" "${@}"