diff options
author | Michał Górny <mgorny@gentoo.org> | 2021-04-18 00:42:19 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2021-04-29 13:42:13 +0200 |
commit | ece1201e42e780360e57add25949a5d4018c585d (patch) | |
tree | 742b1a48f4ebdd521b35624d5690e1d9e284e220 /metadata | |
parent | dev-python/google-api-python-client: Add a test dep on pandas (diff) | |
download | gentoo-ece1201e42e780360e57add25949a5d4018c585d.tar.gz gentoo-ece1201e42e780360e57add25949a5d4018c585d.tar.bz2 gentoo-ece1201e42e780360e57add25949a5d4018c585d.zip |
install-qa-check.d: Make DUS check distinguish entry points
Make DISTUTILS_USE_SETUPTOOLS check explicitly distinguish rdepend due
to entry points from explicit rdepend. This currently does not change
the result but it will change in the future.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'metadata')
-rw-r--r-- | metadata/install-qa-check.d/60distutils-use-setuptools | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/metadata/install-qa-check.d/60distutils-use-setuptools b/metadata/install-qa-check.d/60distutils-use-setuptools index 3b9523fcdaba..8970a6ab9989 100644 --- a/metadata/install-qa-check.d/60distutils-use-setuptools +++ b/metadata/install-qa-check.d/60distutils-use-setuptools @@ -1,4 +1,4 @@ -# Copyright 2020 Gentoo Authors +# Copyright 2020-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # QA check: verify correctness of DISTUTILS_USE_SETUPTOOLS @@ -24,17 +24,16 @@ distutils_use_setuptools_check() { if [[ -f ${egg} ]]; then # if .egg-info is a file, it's plain distutils new_expected=no - elif grep -q -s -F '[console_scripts]' \ - "${egg}"/entry_points.txt - then - # entry_points == we need rdepend - new_expected=rdepend elif [[ -f ${egg}/requires.txt ]] && grep -q -s '^setuptools' \ <(sed -e '/^\[/,$d' "${egg}"/requires.txt) then # explicit *unconditional* rdepend in package metadata new_expected=rdepend + elif grep -q -s -F '[console_scripts]' \ + "${egg}"/entry_points.txt + then + new_expected=entry-point else new_expected=bdepend fi @@ -46,7 +45,6 @@ distutils_use_setuptools_check() { fi done - # at this point, expected can contain: no bdepend rdepend if [[ ${#expected[@]} -gt 1 ]] && has no "${expected[@]}"; then # 'no' and '[rb]depend' are mutually exclusive eerror "The package seems to have used distutils and setuptools simultaneously." @@ -54,8 +52,10 @@ distutils_use_setuptools_check() { eerror "https://dev.gentoo.org/~mgorny/python-guide/distutils.html#conditional-distutils-setuptools-use-in-packages" eerror "Please report a bug about this and CC python@" elif [[ ${#expected[@]} -gt 0 ]]; then - # bdepend+rdepend=rdepend + # *+rdepend=rdepend has rdepend "${expected[@]}" && expected=( rdepend ) + # for the time being, entry points imply rdepend + has entry-point "${expected[@]}" && expected=( rdepend ) # at this point, expected should have exactly one value [[ ${#expected[@]} -eq 1 ]] || die "integrity error" |