From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 26F30139694 for ; Fri, 5 May 2017 21:29:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6576CE0DB8; Fri, 5 May 2017 21:28:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 18776E0D1A for ; Fri, 5 May 2017 21:28:52 +0000 (UTC) Received: from localhost.localdomain (d202-252.icpnet.pl [109.173.202.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id A4FC33416D0; Fri, 5 May 2017 21:28:49 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH] distutils-r1.eclass: Namespace & doc _clean_egg_info Date: Fri, 5 May 2017 23:28:45 +0200 Message-Id: <20170505212845.18868-1-mgorny@gentoo.org> X-Mailer: git-send-email 2.13.0.rc1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: af23ecbd-746a-49e5-a1a9-0070b8058eff X-Archives-Hash: 747739349da42c430fd950eddfab672c Prefix the _clean_egg_info function with an appropriate namespace, and document its purpose with eclassdoc format. Be more verbose on the exact problem being solved; remove URL to old upstream bug tracker that no longer exists. --- eclass/distutils-r1.eclass | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) ** REVIEW NOTE ** Do we still need this hack? Is there any chance the issue has been fixed upstream? Can someone test it and find a bug upstream and/or re-report it? diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 5df7234332d3..1376326c9579 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -770,10 +770,14 @@ distutils-r1_src_compile() { fi } -_clean_egg_info() { - # Work around for setuptools test behavior (bug 534058). - # https://bitbucket.org/pypa/setuptools/issue/292 - rm -rf "${BUILD_DIR}"/lib/*.egg-info +# @FUNCTION: _distutils-r1_clean_egg_info +# @INTERNAL +# @DESCRIPTION: +# Clean up potential stray egg-info files left by setuptools test phase. +# Those files ended up being unversioned, and caused issues: +# https://bugs.gentoo.org/534058 +_distutils-r1_clean_egg_info() { + rm -rf "${BUILD_DIR}"/lib/*.egg-info || die } distutils-r1_src_test() { @@ -781,7 +785,7 @@ distutils-r1_src_test() { if declare -f python_test >/dev/null; then _distutils-r1_run_foreach_impl python_test - _distutils-r1_run_foreach_impl _clean_egg_info + _distutils-r1_run_foreach_impl _distutils-r1_clean_egg_info fi if declare -f python_test_all >/dev/null; then -- 2.13.0.rc1