Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH] distutils-r1.eclass: Namespace & doc _clean_egg_info
Date: Fri, 05 May 2017 21:29:02
Message-Id: 20170505212845.18868-1-mgorny@gentoo.org
1 Prefix the _clean_egg_info function with an appropriate namespace,
2 and document its purpose with eclassdoc format. Be more verbose
3 on the exact problem being solved; remove URL to old upstream bug
4 tracker that no longer exists.
5 ---
6 eclass/distutils-r1.eclass | 14 +++++++++-----
7 1 file changed, 9 insertions(+), 5 deletions(-)
8
9 ** REVIEW NOTE **
10
11 Do we still need this hack? Is there any chance the issue has been
12 fixed upstream? Can someone test it and find a bug upstream and/or
13 re-report it?
14
15 diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
16 index 5df7234332d3..1376326c9579 100644
17 --- a/eclass/distutils-r1.eclass
18 +++ b/eclass/distutils-r1.eclass
19 @@ -770,10 +770,14 @@ distutils-r1_src_compile() {
20 fi
21 }
22
23 -_clean_egg_info() {
24 - # Work around for setuptools test behavior (bug 534058).
25 - # https://bitbucket.org/pypa/setuptools/issue/292
26 - rm -rf "${BUILD_DIR}"/lib/*.egg-info
27 +# @FUNCTION: _distutils-r1_clean_egg_info
28 +# @INTERNAL
29 +# @DESCRIPTION:
30 +# Clean up potential stray egg-info files left by setuptools test phase.
31 +# Those files ended up being unversioned, and caused issues:
32 +# https://bugs.gentoo.org/534058
33 +_distutils-r1_clean_egg_info() {
34 + rm -rf "${BUILD_DIR}"/lib/*.egg-info || die
35 }
36
37 distutils-r1_src_test() {
38 @@ -781,7 +785,7 @@ distutils-r1_src_test() {
39
40 if declare -f python_test >/dev/null; then
41 _distutils-r1_run_foreach_impl python_test
42 - _distutils-r1_run_foreach_impl _clean_egg_info
43 + _distutils-r1_run_foreach_impl _distutils-r1_clean_egg_info
44 fi
45
46 if declare -f python_test_all >/dev/null; then
47 --
48 2.13.0.rc1

Replies